Call destructor directly.

Agustin agustin.l.alvarez at hotmail.com
Sun Oct 20 19:05:48 PDT 2013


I'm implementing some custom memory allocator, is possible to 
call an object destructor directly?

For example

void deallocate(T)(T object)
{
   assert(object !is null);

   object.~this();
   rawDeallocate(cast(void *)object);
}


More information about the Digitalmars-d-learn mailing list