[SDL] FreeSurface calls
Matthijs Hollemans
matthijs at allyoursoftware.com
Thu Oct 17 00:11:03 PDT 2002
> I am just eager to know the co-relation to SDL_FreeSurface() and
> IMG_Load(), a call from SDL_image. It seems when I read this
mailinglist
> that SDL_FreeSurface() calls is only related to SDL_LoadBMP()
calls?
I don't use SDL_image so I can't help you there, but you should use
SDL_FreeSurface on any surface that you allocate, except the main
surface that you get back from SDL_SetVideoMode. You should free any
surfaces that you create using SDL_LoadBMP, SDL_CreateRGBSurface,
SDL_DisplayFormat, etc. (Basically any function that gives you back
a new SDL_Surface object, except SDL_SetVideoMode. That surface is
automatically freed by SDL_Quoit.)
--
Matthijs Hollemans
All Your Software
www.allyoursoftware.com
More information about the SDL
mailing list