[1.0.27] Memory leaks when playing a map
Posted: Sat Oct 27, 2007 2:26
I ran into a couple memory leaks that would occur when playing maps. The first one has to do with the clipper not being freed after its use. I added this block to the end of gl_RenderView() to fix it:
The other one is happening as a result of this block in gl_PreprocessLevel():
It didn't appear to be doing anything (except causing a leak), so I just commented it out. Everything seems to work fine despite doing that.
Code: Select all
// [BC] We need to clear the clipper once again to prevent a memory leak. It's not a
// great solution, but it'll do for now.
clipper.Clear( );
Code: Select all
gl_ss_renderflags = new byte[numsubsectors];
memset(gl_ss_renderflags, 0, numsubsectors * sizeof(byte));