www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3518] New: Destructor not called on temporaries

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3518

           Summary: Destructor not called on temporaries
           Product: D
           Version: 2.032
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bartosz relisoft.com



PST ---
Created an attachment (id=499)
Test case

Function f returns (by value) a struct with a destructor. When I assingn the
return to a temporary variable, its destructor is called at the end of the
scope. If I don't assign it, the destructor of an implicit temporary is not
called. In my example this screws up reference counting.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 16 2009
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=3518


Bartosz Milewski <bartosz relisoft.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



PST ---
*** This issue has been marked as a duplicate of issue 3516 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 16 2009