Clean way to tell whether a destructor is called by the GC

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri May 15 11:01:17 PDT 2015


On Thursday, 14 May 2015 at 17:25:55 UTC, ponce wrote:
> But then we would need a standardized name (some use "close", 
> some use "dispose", some use "release")

In .net the standardized name is "dispose" and IDisposable 
interface having the method: 
https://msdn.microsoft.com/en-us/library/System.IDisposable.aspx 
it also suggests possible operations "free" and "reset". "close" 
makes sense for files, but files are not the only type of 
disposable resource.


More information about the Digitalmars-d-learn mailing list