[1.0.27] Memory leaks when playing a map

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
Carnevil
Developer
Developer
Posts: 99
Joined: Thu Oct 13, 2005 0:13

[1.0.27] Memory leaks when playing a map

Post by Carnevil »

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:

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( );
The other one is happening as a result of this block in gl_PreprocessLevel():

Code: Select all

gl_ss_renderflags = new byte[numsubsectors];
memset(gl_ss_renderflags, 0, numsubsectors * sizeof(byte));
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.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

gl_ss_renderflags is indeed development garbage. The data wasn't used for anything whatsoever.

And the clipper was simply missing a proper destructor.
Locked

Return to “Closed Bugs”