_mental_ wrote:linked lists and garbage collection[/url].
Two things that constantly seem to be at odds with each other - the main reason why I avoid using linked lists with objects in new code.
The PR looks ok but I'll wait for someone to confirm that it works.
I did some more testing with those three samples, and then I tested it in my mod series where the bug originally happened. Mental's solution fixes the issue entirely.