www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: crystal clear()

Andrei Alexandrescu Wrote:

 On 09/17/2010 04:55 PM, Steven Schveighoffer wrote:
 On Fri, 17 Sep 2010 17:33:11 -0400, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:

 I think clear() can be fixed if we remove the call to the constructor
 AND obliterate the vptr.


One more thing: we need to change the call to the destructor to check the vptr. If the vptr is null, no call to the destructor. Where is that piece of code? Couldn't find it by grepping for __dtor.

druntime src/rt/lifetime.d, look for _d_delclass or rt_finalize.
Sep 17 2010