Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/14/2012 in all areas

  1. Addictgamer

    A Never Do With Sdl.

    the_surface = SDL_DisplayFormatAlpha(the_surface); That will cause memory to be lost. It is unrecoverable - a memleak! Everybody's favorite! So ya, you're going to have to do something like this: SDL_Surface *the_surface = null; SDL_Surface *temp_surface = SDL_CreateRGBSurface(SDL_SWSURFACE, width, height, NPP, 0,0,0,0); the_surface = SDL_DisplayFormatAlpha(temp_surface); SDL_FreeSurface(temp_surface); //Free this. Ya, I would have much rather preffered removing the temp_surface from that and having the SDL_CreateRGBSurface apply for the_surface, but it don't work! Like I said at the start of this post, the_surface = SDL_DisplayFormatAlpha(the_surface); memory leaks.
    1 point
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.