Finished removing unused leak detection code.
authorSam Lantinga <slouken@libsdl.org>
Fri, 11 Feb 2011 14:42:06 -0800
changeset 5257956d42855c92
parent 5256 bbdf9250ee8b
child 5258 f26314c20071
Finished removing unused leak detection code.
src/SDL.c
     1.1 --- a/src/SDL.c	Fri Feb 11 14:23:22 2011 -0800
     1.2 +++ b/src/SDL.c	Fri Feb 11 14:42:06 2011 -0800
     1.3 @@ -29,10 +29,6 @@
     1.4  #include "haptic/SDL_haptic_c.h"
     1.5  #include "joystick/SDL_joystick_c.h"
     1.6  
     1.7 -#if !SDL_VIDEO_DISABLED
     1.8 -#include "video/SDL_leaks.h"
     1.9 -#endif
    1.10 -
    1.11  /* Initialization/Cleanup routines */
    1.12  #if !SDL_TIMERS_DISABLED
    1.13  extern void SDL_StartTicks(void);
    1.14 @@ -49,9 +45,6 @@
    1.15  static Uint32 SDL_initialized = 0;
    1.16  static Uint32 ticks_started = 0;
    1.17  
    1.18 -#ifdef CHECK_LEAKS
    1.19 -int surfaces_allocated = 0;
    1.20 -#endif
    1.21  
    1.22  int
    1.23  SDL_InitSubSystem(Uint32 flags)
    1.24 @@ -220,15 +213,6 @@
    1.25  #endif
    1.26      SDL_QuitSubSystem(SDL_INIT_EVERYTHING);
    1.27  
    1.28 -#ifdef CHECK_LEAKS
    1.29 -    /* !!! FIXME: make this an assertion. */
    1.30 -    /* Print the number of surfaces not freed */
    1.31 -    if (surfaces_allocated != 0) {
    1.32 -        fprintf(stderr, "SDL Warning: %d SDL surfaces extant\n",
    1.33 -                surfaces_allocated);
    1.34 -    }
    1.35 -#endif
    1.36 -
    1.37      /* Uninstall any parachute signal handlers */
    1.38      SDL_UninstallParachute();
    1.39