Minib3d Memory Leak

BlitzMax Forums/MiniB3D Module/Minib3d Memory Leak

Kippykip(Posted 2013) [#1]
Freeentity does not free the mesh and builds up
Setting it to null doesn't help with GC
And putting a :TMesh, :TEntity does not help

IDEAZ?


TomToad(Posted 2013) [#2]
Are you calling FreeEntity(Entity) before setting the entity to null?


Kippykip(Posted 2013) [#3]
Yes, I was a bit more specific on this thread
http://www.blitzbasic.com/Community/posts.php?topic=101798
I had the code comparisons etc there


Kippykip(Posted 2013) [#4]
Just started debugging everything and found out it wasn't the meshes causing the memory to increase, BUT THE SOUNDS :O

Starting code
Global MUS_TITLE:TSound
Global CHANNEL_TITLE:TChannel
Global MUS_LEVEL:TSound
Global SND_FISTATK:TSound
Global SND_PISTOLATK:TSound
Global SND_SHOTGUNATK:TSound
Global CHANNEL_LEVEL:TChannel

Loading code
MUS_LEVEL=LoadSound("data\sound\K_MAP" + level + ".OGG",1)
LoopSound(MUS_LEVEL)
CHANNEL_LEVEL = CueSound(MUS_LEVEL)
ResumeChannel(CHANNEL_LEVEL)

Unloading code
StopChannel(CHANNEL_LEVEL)
CHANNEL_LEVEL = Null
MUS_LEVEL = Null


Forgot to unload the pistol sound