> To avoid having to change your other code, I'd do this: > > wchar[] t = ...; > scope(exit) delete t; // add this line to the end of the function (after > returning) > > There is another way, but it's not as easy: > > // put this at the top of file > import core.memory; > > ... > > scope(exit) GC.free(t.ptr);
does "scope wchar[] t = ...;" work too ?
