memory leak?

BlitzMax Forums/BlitzMax Programming/memory leak?

Hujiklo(Posted 2010) [#1]
Check the code below. When I load another level I free stuff as you would expect - What has me really puzzled is that if I actually free a texture it's costing me more ram each new level. If I don't use freetexture() then the ram stays constant give or take a couple of KB.

I know this is minib3d, but can I just remove types from lists and not worry about their contents in Bmax? In this instance it seems better to not free these textures...Anybody know why freeing textures is actually costing more ram each level? Should I bother?



For Local t:tgraphic = EachIn menu_list
	
  If t.group_id = 100

    'FreeTexture (t.tex)

     ListRemove menu_list, t
	
  EndIf

Next




wmaass(Posted 2010) [#2]
Hi,

You might be have something like what I ran into. Check the threads below. In the end I think I had to compile with a specific version of BMax in order to fix my issue.

http://www.blitzbasic.com/Community/posts.php?topic=88009#998942

http://www.blitzbasic.com/Community/posts.php?topic=87985#998800

EDIT: I now recall that I have another project with the exact issue you are having - decided to live with it given the usage scenerios of my customer and small amount of memory lost. Still...would be good to fix.