Question about Object.destroy
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Sep 20 11:50:42 PDT 2015
On Sunday, 20 September 2015 at 18:41:18 UTC, anonymous wrote:
> But that doesn't change either. I think Adam is mistaken here.
huh, I just checked the source... and you are right, it doesn't
set classes to null itself, but does null out the vtable inside.
*ppv = null; // zero vptr even if `resetMemory` is false
druntime/src/rt/lifetime.d line 1373
So that's why it is segfaulting, the table of virtual functions
is nulled after it is destroyed rather than the reference.
More information about the Digitalmars-d-learn
mailing list