>pNext could point to a 'file' that's not reachable otherwise, and the garbage collector would be unaware of the reference and collect the object while you are iterating through the list
... the FILE objects were only meant as example.
My own objects will use the _gc meta function and will automatically
be removed from the list if _gc is invoked. (removing objects from a
list is a very fast operation, you just have to modify the pNext
pointer pointing to the object in deletion - here must be exactly ONE
such pNext, otherwise somethng wrong in the list...).
So I hope with this list removal in _gc then all will work fine for
sure? Or do you still see any issue?