ZDoom / gzdoom

GZDoom is a feature centric port for all Doom engine games, based on ZDoom, adding an OpenGL renderer and powerful scripting capabilities
http://zdoom.org
GNU General Public License v3.0
2.33k stars 528 forks source link

Attempt to fix skyinfo lifetime issue #2520

Closed Talon1024 closed 2 months ago

Talon1024 commented 2 months ago

This is probably not a proper fix, but I have no idea what a proper fix for this would be.

coelckers commented 2 months ago

This leaks memory like crazy. A proper fix would be to make HWSkyInfo live through the PutPortal call which copies it to somewhere longer lived, i.e. move the variable definition out of the 'if'.