On 07/29/2012 03:03 PM, Minas Mina wrote:

Having a destructor and that you know when is going to be called is VERY
useful!
So by removing the "delete" keyword, what happens? We won't have a way
to destroy objects in a predictable way anymore? (I'm not talking about
structs in any way).

Thanks

import std.stdio;
void main(){
    auto c = new class{ ~this(){writeln("destroyed!");} };
    version(future) destroy(c);
    else clear(c);
}

clear is being renamed to destroy starting from the next release IIRC.

Reply via email to