[Issue 6437] Refcounted calls dtor before ctor, never calls dtor for globals

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 19 18:33:04 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6437


Andrej Mitrovic <andrej.mitrovich at gmail.com> changed:

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


--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2012-04-19 18:34:00 PDT ---
(In reply to comment #2)
> I just tried the example in D 2.058 and the extra dtors appear to have been
> fixed. The issue with globals and destruction still exists. For now, you can
> work around the problem using 
> 
> static ~this() {  typeid(foo).destroy(&foo1); }

Yes it's fixed, thanks. The globals issue isn't really a bug since destruction
of globals isn't guaranteed (IIRC the docs were updated recently to acknowledge
this).

-- 
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