Why "on function exit" style defers - already known to be a bad idea from Go - is beyond me. Such a solution more or less requires storage of potentially unbounded allocations.
Foo *f;
for (int i = 0; i < very_big_value; i++) {
f = get_foo(i);
// BOOM
defer return_foo(f);
}
I would sort of understand if this was proposed for a high level language garbage collection where actual memory usage is secondary.