When I should to call destroy?

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Jul 29 06:35:49 PDT 2016


On Friday, 29 July 2016 at 13:18:00 UTC, Suliman wrote:
> But I can't understand if D have GC it should remove objects 
> when their life is finished. When I should to call `destroy`? 
> What would be if I will not call it?

You should call destroy when you want to call the destructor 
deterministically, see 
https://en.wikipedia.org/wiki/Resource_management_%28computing%29 
- compare with automatic resource management.


More information about the Digitalmars-d-learn mailing list