TList memory management
BlitzMax Forums/BlitzMax Beginners Area/TList memory management
| ||
why in this code there is a memory leak? please help-me! my head explode! ;) |
| ||
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! |
| ||
no Solution/Suggestions ? |
| ||
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 |
| ||
I don't think it's a leak, as much as a memory pool issue. Do you experience this in production code aswell? |
| ||
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! |