GC-proof resource classes

ponce via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 29 07:00:58 PDT 2015


On Saturday, 29 August 2015 at 13:43:33 UTC, cym13 wrote:
> But nobody's linking the destructor to it because of the 
> separation of concerns principle: we release what has to be 
> released and only that: freeing the object is the realm of the 
> GC.

I see what you mean, but Unique!T, RefCounted!T and scoped!T call 
the destructor, not the release() function you just defined. So 
separating concerns break those.


More information about the Digitalmars-d mailing list