GC.collect bug ?

Sean Kelly sean at invisibleduck.org
Tue Sep 17 10:53:16 PDT 2013


On Sep 17, 2013, at 4:14 AM, Temtaime <temtaime at gmail.com> wrote:

> I cannot use the delete/destroy. I want to call dtor at all unreferenced objects.
> Manual from Dlang size says that GC.collect triggers a full collection. But it doesn't.

It does.  But the collector isn't guaranteed to collect everything that is no longer referenced during a given collection cycle.  It's possible a register still holds the reference to that object.  Try doing a bit more stuff before collecting and see if that changes behavior.  Or allocate a second dummy object.


More information about the Digitalmars-d-learn mailing list