Remove not removing..

BlitzMax Forums/BlitzMax Programming/Remove not removing..

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I would think it has something to do with removing the link of the current object in the list before the For loop has a chance to get the next value.

I don't know if that's the problem for sure but this works

global list:TList
for i = 1 to list.Count()
    list.RemoveLast()
next

or

while (not list.IsEmpty())
    list.RemoveLast()
wend