[SDL] SDL_ttf memory leak
e9726056 at student.tuwien.ac.at
Thu Feb 7 22:42:01 PST 2002
i've just experimented a bit with the SDL_ttf 2.0.4 library, but when i
fired up the win2k task manager while running my prog, i discovered it
continued to allocate more RAM and never freed it.
when i comment the following block, the memory usage stays constant.
forecol.r = 0; forecol.g=0; forecol.b = 0;
SDL_Surface *text = TTF_RenderText_Solid(arial, "Hello world!!",
if(text != NULL)
dstrect.x = 400;
dstrect.y = i++;
dstrect.w = text->w;
dstrect.h = text->h;
SDL_BlitSurface(text, NULL, screen, &dstrect);
that's it. leaks about 16KB per second i'd say.
has anyone encountered this before? is it a bug in SDL_ttf or in the
Freetype library? most importantly, is there a fix?
More information about the SDL