Cursor-Custodian icon indicating copy to clipboard operation
Cursor-Custodian copied to clipboard

There might be a memory leak

Open milkydelta opened this issue 3 years ago • 0 comments

In renderwindow.cpp, there are some functions that render text, specifically the function "renderCenter" and the last overload of "render" (the one that starts on line 87). I noticed that they create an sdl_surface and copy it to an sdl_texture. The surface is freed at the end by a call to SDL_FreeSurface, but there is no call to SDL_DestroyTexture for the texture.

This leaks memory significantly slower than Twini-Golf did, which is why it probably hasn't been noticed.

milkydelta avatar Jun 17 '22 22:06 milkydelta