Delete

Destroys an object of type T previously created by New and calls its destructor if necessary.

alias Delete = deallocate

Examples

MyClass c = New!MyClass(10, 4, 5);
int[] arr = New!(int[])(100);
assert(arr.length == 100);
MyStruct* s = New!MyStruct;
Delete(c);
Delete(arr);
Delete(s);

Meta