is there any way for an object to make it self no longer usable

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jul 19 11:49:19 PDT 2014


On Saturday, 19 July 2014 at 17:28:13 UTC, Frustrated wrote:
> If you do this you are potentially asking for a lot of access 
> violation errors or undefined behavior.

Of course, the object should not be used after destruction. The 
trick is to reliably diagnose it. If such uses are not 
intercepted, they may remain unnoticed. GC can't solve the issue, 
because it's not a memory resource, which is released.


More information about the Digitalmars-d-learn mailing list