[Issue 1764] Scoped sub-objects not garbage collected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 2 22:18:27 PST 2008


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


bugzilla at digitalmars.com changed:

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




------- Comment #1 from bugzilla at digitalmars.com  2008-01-03 00:18 -------
The sub-objects are not guaranteed to be collected when the enclosing object is
deleted, because there is no guarantee there are no other references to those
sub-objects. Because of the way register allocation is done, there may be
references to those sub-objects that persist beyond where logically there are
no more references. This is the way a conservative gc works.

To guarantee they are deleted when the object is deleted, put those deletions
in the object's destructor. You'll have to take responsibility, however, for
there being no other active references to it.


-- 



More information about the Digitalmars-d-bugs mailing list