[Issue 3236] New: Postblit called but no matching destructor

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 8 12:04:27 PDT 2009


           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 at puremagic.com
        ReportedBy: bartosz at 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: -------

More information about the Digitalmars-d-bugs mailing list