Will this free up memory correctly?

BlitzMax Forums/BlitzMax Programming/Will this free up memory correctly?

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.

@H&K - clear just cycles the links and releases them until the head is empty. This is hugely faster than Foreach loop, and then calling remove.

@Dreamora & @Alex O. - I stand corrected, I hadnt looked at it in a while but thought I had seen it doing scans to last node. Might have changed or I might be confused. Thanks for clarification.

Frankly I have given up using TLists for time critical code, due to the way it interacts with Garbage collecion I have found preaollocating and using custom pools completey removes Garbage collection, once I have set everything up. Not to say I never use them I try to avoid them when they have large numbers of elements to process, like Particles. This is standard trick for dealing with Garbage Collected languages, .NET, D++, C++ with a Garbage Collector. They make everything easy at the expense of random bumps in performance. But nothing a lttle coding cant work around.

Doug Stastny