TList.Clear - do I have to worry about anything?

BlitzMax Forums/BlitzMax Beginners Area/TList.Clear - do I have to worry about anything?

If I use clear method of tlist do I have to manualy delete stored objects (ie. images) or tlist will delete them for me?

thanks
Roman

If you *only* have references to those TImages in the list, when you do a Clear the Garbage Collector will dispose of them (when, depending if you have it on auto or manual).

Care only about references. References inside a list are lost when the list is cleared, AFIIK. If you have references in other lists or whatever you have to dereference them too

Hope it helps

If you remove the object links from the list then GC will release the used memory when the object variable is reused, goes out of scope or is set to null.