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

Created an attachment (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:
------- You are receiving this mail because: -------

Reply via email to