Manual Deletion from Destructor

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Mar 14 09:13:32 PDT 2009


On Sat, Mar 14, 2009 at 11:53 AM, dsimcha <dsimcha at yahoo.com> wrote:

> The point is that the destructor for instances of Foo is called by the GC, not
> manually.   The GC may have already realized that hugeDataStructure is not
> reachable.  Does this make the delete statement in the d'tor unsafe, or is it
> still ok?

Accessing or deleting any GC-managed memory in a destructor is unsafe,



More information about the Digitalmars-d mailing list