beforeGarbageCollection

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Wed Jun 16 22:52:57 PDT 2010


I'm thinking of a feature that would improve the memory footprint of D 
programs. Say druntime provided a function:

void beforeGarbageCollection(void delegate() callMe);

The runtime would guarantee that callMe gets called before any 
collection. That would allow modules to clean up caches (e.g. free 
lists) to improve their memory profile.

Any thoughts, please share.


Andrei


More information about the Digitalmars-d mailing list