Possible memory leak in shadow code?
by Skylar Kelty · in Torque Game Engine · 07/01/2006 (2:35 am) · 3 replies
Apparently there is a memory leak in sgshadow.cc
line 135:
Quote:Leak in c:\sphyxgames\dawnofmen\dawnofmen 0.9\engine\synapsegaming\contentpacks\lightingpack\sgshadow.cc: 135 264 (523719)(from memory leak finder log)
line 135:
shadow = new Shadow;Are the shadows ever deleted? if not where should they be deleted?
About the author
Torque Owner John Kabus (BobTheCBuilder)
For performance reasons those shadows are cached, but unfortunately the cleanup code was omitted. If you need to take care of this now, you can delete the shadows from the shadow vector in the sgSceneObject destructor.
Luckily under most conditions the leak is slow and doesn't affect the game.