Newbie initial comments on D language - destructor usage
Janice Caron
caron800 at googlemail.com
Wed Jan 30 00:01:43 PST 2008
On 1/30/08, James Dennett <jdennett at acm.org> wrote:
> I suspect Janice just mis-quoted some C++ code, moving "delete this"
> to somewhere it doesn't belong.
Nah, I just misremember it. It should of course be
~MyHeapClass()
{
operator delete(this);
}
That does the memory deallocation without re-calling the destructor. :-)
More information about the Digitalmars-d
mailing list