Question about Object.destroy

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Sep 20 11:21:50 PDT 2015


Very simple: destroy(s) (or s.destroy but i prefer destroy(s)) 
will set the reference it is passed to null because you aren't 
supposed to use it anymore.

So after calling destroy(s), s is null, so it segfaults when you 
try to use it.


More information about the Digitalmars-d-learn mailing list