Relative Content

Tag Archive for cmemory-leakssdl-2sdl-ttf

Memory leak anxiety for SDL_ttf functions

I’m using SDL2 and SDL2_ttf libs in the code below. It runs OK for now but I’m anxious for leaking memory. Do I need to uncomment the commented lines and free the surface & texture pointers each time the loop calls the function? Do TTF_RenderText_Blended & SDL_CreateTextureFromSurface functions allocate new memory space each time the loop calls the renderText function?