Runtimes with garbage collectors typically optimize for allocation, not deletion.
Generational GC optimizes for both. They assume that most objects die young, so choose to relocate live objects and just mark the entire region that was evacuated as empty. So this is a very efficient way to delete data.
I have long day-dreamed of what a “use it (soon) or loose it” runtime would mean. Allocated blocks would just expire after a set time.
So kind of like browsers work now with the tab unloading and Android killing apps?
Personally I find it really obnoxious and disruptive.
You would prefer something a little more persistent?
I would prefer a 48 hour day, so that I could get everything done that needs to be done.
Or maybe a 72 hour day, so I'd have time for things that I'd just enjoy.