GC.collect bug ?

Dicebot public at dicebot.lv
Wed Sep 18 07:59:54 PDT 2013


On Tuesday, 17 September 2013 at 11:14:10 UTC, Temtaime 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 is not possible by design as GC is not deterministic. 
Destructors are not guaranteed to be ever run at all. You need to 
change your program architecture if you rely on it right now.


More information about the Digitalmars-d-learn mailing list