Documentation of object.destroy

jmh530 john.michael.hall at gmail.com
Tue Jan 2 20:07:11 UTC 2018


On Tuesday, 2 January 2018 at 17:16:54 UTC, Steven Schveighoffer 
wrote:
>
> It does something different depending on the type:
>
> Objects: calls rt_finalize on the object, which calls the dtor, 
> deletes the monitor, rewrites the init value to the object, and 
> THEN zeroes the vtable ptr. This last step makes it inoperable 
> for anyone still holding a pointer to the object. This is why I 
> think the docs are written the way they are.


What's the monitor do? I see that in the ABI documentation, but 
it doesn't really explain it...


More information about the Digitalmars-d mailing list