TList memory management

BlitzMax Forums/BlitzMax Beginners Area/TList memory management

GregBUG(Posted 2005) [#1]
why in this code there is a memory leak?

please help-me!
my head explode! ;)




GregBUG(Posted 2005) [#2]
sorry i forgot...

if you create a list with 20 elements no memory leak, but with
21 elements there is a memory leak!!

ex:

TestList = cTest.Create(20)
no memory leak!

TestList = cTest.Create(21)
400 bytes memory leak!

help!


GregBUG(Posted 2005) [#3]
no Solution/Suggestions ?


SSS(Posted 2005) [#4]
well you can get the memory leak down by putting a flushmem in the loop in which it is creating the elements.. but that still leaves a 4000byte gap which i cant fix


FlameDuck(Posted 2005) [#5]
I don't think it's a leak, as much as a memory pool issue.

Do you experience this in production code aswell?


GregBUG(Posted 2005) [#6]
yes.

but i think we need more clarity about memory management of blitzMax.

i don't think there is a bug in my test code... but the memory is not freed correctly!

...at this point i don't konw if it's me that i don't have understand the blitzmax memory management or if the blitzmax memory management it's not so clean!

help!