SDL_Surface *surface
CODE:
char* CLASS = "SDL::Surface";
- RETVAL = SDL_DisplayFormat(surface);
+
+ SDL_Surface *new_surface = SDL_DisplayFormat(surface);
+ SDL_FreeSurface(surface);
+ RETVAL = new_surface;
OUTPUT:
RETVAL
SDL_Surface *surface
CODE:
char* CLASS = "SDL::Surface";
- RETVAL = SDL_DisplayFormatAlpha(surface);
+ SDL_Surface *new_surface = SDL_DisplayFormatAlpha(surface);
+ SDL_FreeSurface(surface);
+ RETVAL = new_surface;
OUTPUT:
RETVAL