Whys it causing a memory leak? (types and lists)

BlitzMax Forums/BlitzMax Beginners Area/Whys it causing a memory leak? (types and lists)

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.

Change your main loop to this:
Repeat

For n=1 To 1024
p:particle=New particle
ListAddLast particle_list,p
Next

For p:particle=EachIn particle_list
ListRemove particle_list,p
Next

FlushMem
Print MemAlloced()

Flip
Cls
Until KeyDown(key_escape)