Re:For Better Computing, Liberate CPUs from Garbage Collection
by nine_k on Thursday May 09, 2019 @09:56PM
(#19874395)
You can of course introduce a space leak in a honest GC environment. Make a linked list, and keep adding items to it while keeping its head referenced. Of course you do it by mistake: you kept two references, the main and the auxiliary, and the main reference is duly gone.
This is why weak references were invented.