malloc+free can be trusted if wrapped in something like a ref counted pointer, no?
Foo bazoom;
class Foo {
void bar() {
bazoom = this;
}
}
void foo() {
RefCounted!Foo f = ...
f.bar();
// bazoom is now a dandling pointer.
}
