Quote Originally Posted by slenkar View Post
AAARRRRGGGHHHHH

Ive been scouring the internet for an example of how to remove an object from a Tobjectlist with no luck

Code:
for iter3:=0 to obby_list.count-1 do
begin
obj:=obby_list.items[iter3];
obby_list.remove(obj);
end;
this example crashes with exception 'unknown'
Just to clarify it a bit, that code snippet will not work, but Srki_82's code will. The problem is that both Remove and Delete methods remove the the object from the list and move all objects that were behind it in the list 1 position up in the list, i.e, when you remove the first object on position 0, the object on position 1 moves to position 0, the object on position 2 to position 1, etc.

Regarding the memory, as long the property OwnsObjects is true Remove will free the object. Not sure if Delete will.