GC: memory collected but destructors not called

Uranuz via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 12 12:00:29 PST 2014


If we will have something like *scoped destructor* (that will be 
executed at scope exit) could it help to release some resources? 
I worry about this problem too because even using class to hold 
resource I expirience some *delays* in relesing them. For example 
I have database connection opened. And I want to close it when I 
finished my job. Relying on GC I sometimes experiece problems 
like *too many DB connections*, because GC frees it not enough 
quickly.


More information about the Digitalmars-d mailing list