www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 3236] New: Postblit called but no matching destructor

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

           Summary: Postblit called but no matching destructor
           Product: D
           Version: 2.032
          Platform: All
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: critical
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bartosz relisoft.com


Created an attachment (id=438)
 --> (http://d.puremagic.com/issues/attachment.cgi?id=438)
Test case for incorrect reference counting

RcName is a struct that defines postblit, this(this), in order to implement
reference counting. When I store the result of a call and then return it:
  RcName rc = create();
  return rc;
I get the right reference count. But if I return directly:
  return create();
postblit is called (increasing ref count), but the destructor is not, so I end
up with ref count that is too big

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED




--- Comment #1 from Walter Bright <bugzilla digitalmars.com>  2009-09-03
13:43:53 PDT ---
Fixed dmd 2.032

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