[SDL] Re: TTF_RenderText functions increasing memory usage

James O\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'Meara james at nformant.net
Sat Nov 5 01:10:05 PST 2005

Nick Stovall <nsto135 <at> aol.com> writes:

> Thanks for all the help. I thought you only had to free surfaces after you were
> finished using them. That explains a lot, though... when the player is at the
> main menu, the menu text was loaded into the cooresponding surface once per
> frame, changing color depending on whether the mouse was over it or not. I had
> about 5 images being loaded into 5 surfaces once per frame and I wasn't freeing
> them after each use. It never crashed, but it wasn't long until it was using
> 300+ megs of RAM. 
> Thanks again for all the help you guys.

I use SDL when programming for Xbox, so it locks the system up poretty quickly
when you've only got 64MB of RAM and you're refreshing your score incorrectly on
every drame :\

More information about the SDL mailing list