I'm possibly just having a brainfart here, but I'm getting some downright bizarre behaviour with TLists. Namely items being added to lists going walkabouts for no apparent reason. Almost as though TLinks are being reissued, and Removing those TLinks is causing different objects to be removed.
Anyway, I've managed to pinpoint one very clear difference, and that makes no sense either. Specifically, if I add my objects to the list with AddFirst() one particular object remains in that list. If I add all objects to the list with AddLast() that exact same object is not in the list any more. That is the only line of code that changes.
Given that no other code is changing, is there any logical reason why AddLast() and AddFirst() would cause a variance in which objects are and are not on the list?
I'm not using a Compare() method for any of the objects, derived objects or parent objects. I've come across a couple of very obscure bugs when using the Compare method before, but that's not it here.
Anyway, I've managed to pinpoint one very clear difference, and that makes no sense either. Specifically, if I add my objects to the list with AddFirst() one particular object remains in that list. If I add all objects to the list with AddLast() that exact same object is not in the list any more. That is the only line of code that changes.
Given that no other code is changing, is there any logical reason why AddLast() and AddFirst() would cause a variance in which objects are and are not on the list?
I'm not using a Compare() method for any of the objects, derived objects or parent objects. I've come across a couple of very obscure bugs when using the Compare method before, but that's not it here.