Another use case of delete, which is unfortunately deprecated. ;)
----
import std.stdio;
import core.memory;
class A {
~this() { writeln(`dtor`); };
};
void main() {
auto a = new A;
delete a;
writeln(`after dtor`);
}
----
Ooutput:
dtor
after dtor