Removed unused leak detection code.
authorSam Lantinga <slouken@libsdl.org>
Fri, 11 Feb 2011 14:23:22 -0800
changeset 5256bbdf9250ee8b
parent 5255 b0f5108fda60
child 5257 956d42855c92
Removed unused leak detection code.
VisualC/SDL/SDL_VS2005.vcproj
VisualC/SDL/SDL_VS2008.vcproj
VisualC/SDL/SDL_VS2010.vcxproj
Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj
Xcode/SDL/SDL.xcodeproj/project.pbxproj
src/video/SDL_leaks.h
src/video/SDL_surface.c
     1.1 --- a/VisualC/SDL/SDL_VS2005.vcproj	Fri Feb 11 13:06:35 2011 -0800
     1.2 +++ b/VisualC/SDL/SDL_VS2005.vcproj	Fri Feb 11 14:23:22 2011 -0800
     1.3 @@ -900,10 +900,6 @@
     1.4  			>
     1.5  		</File>
     1.6  		<File
     1.7 -			RelativePath="..\..\src\video\SDL_leaks.h"
     1.8 -			>
     1.9 -		</File>
    1.10 -		<File
    1.11  			RelativePath="..\..\src\stdlib\SDL_malloc.c"
    1.12  			>
    1.13  		</File>
     2.1 --- a/VisualC/SDL/SDL_VS2008.vcproj	Fri Feb 11 13:06:35 2011 -0800
     2.2 +++ b/VisualC/SDL/SDL_VS2008.vcproj	Fri Feb 11 14:23:22 2011 -0800
     2.3 @@ -915,10 +915,6 @@
     2.4  			>
     2.5  		</File>
     2.6  		<File
     2.7 -			RelativePath="..\..\src\video\SDL_leaks.h"
     2.8 -			>
     2.9 -		</File>
    2.10 -		<File
    2.11  			RelativePath="..\..\src\SDL_log.c"
    2.12  			>
    2.13  		</File>
     3.1 --- a/VisualC/SDL/SDL_VS2010.vcxproj	Fri Feb 11 13:06:35 2011 -0800
     3.2 +++ b/VisualC/SDL/SDL_VS2010.vcxproj	Fri Feb 11 14:23:22 2011 -0800
     3.3 @@ -315,7 +315,6 @@
     3.4      <ClInclude Include="..\..\src\video\SDL_glfuncs.h" />
     3.5      <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
     3.6      <ClInclude Include="..\..\src\events\SDL_keyboard_c.h" />
     3.7 -    <ClInclude Include="..\..\src\video\SDL_leaks.h" />
     3.8      <ClInclude Include="..\..\src\audio\SDL_mixer_m68k.h" />
     3.9      <ClInclude Include="..\..\src\audio\SDL_mixer_MMX.h" />
    3.10      <ClInclude Include="..\..\src\audio\SDL_mixer_MMX_VC.h" />
    3.11 @@ -467,4 +466,4 @@
    3.12    <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
    3.13    <ImportGroup Label="ExtensionTargets">
    3.14    </ImportGroup>
    3.15 -</Project>
    3.16 \ No newline at end of file
    3.17 +</Project>
     4.1 --- a/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Fri Feb 11 13:06:35 2011 -0800
     4.2 +++ b/Xcode-iPhoneOS/SDL/SDLiPhoneOS.xcodeproj/project.pbxproj	Fri Feb 11 14:23:22 2011 -0800
     4.3 @@ -226,7 +226,6 @@
     4.4  		FDA684560DF2374E00F98A1A /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683090DF2374E00F98A1A /* SDL_blit_N.c */; };
     4.5  		FDA684570DF2374E00F98A1A /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */; };
     4.6  		FDA684580DF2374E00F98A1A /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */; };
     4.7 -		FDA6845B0DF2374E00F98A1A /* SDL_leaks.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA6830E0DF2374E00F98A1A /* SDL_leaks.h */; };
     4.8  		FDA6845C0DF2374E00F98A1A /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */; };
     4.9  		FDA6845D0DF2374E00F98A1A /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */; };
    4.10  		FDA6845E0DF2374E00F98A1A /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683110DF2374E00F98A1A /* SDL_rect.c */; };
    4.11 @@ -518,7 +517,6 @@
    4.12  		FDA683090DF2374E00F98A1A /* SDL_blit_N.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blit_N.c; sourceTree = "<group>"; };
    4.13  		FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_blit_slow.c; sourceTree = "<group>"; };
    4.14  		FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_bmp.c; sourceTree = "<group>"; };
    4.15 -		FDA6830E0DF2374E00F98A1A /* SDL_leaks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_leaks.h; sourceTree = "<group>"; };
    4.16  		FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pixels.c; sourceTree = "<group>"; };
    4.17  		FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pixels_c.h; sourceTree = "<group>"; };
    4.18  		FDA683110DF2374E00F98A1A /* SDL_rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rect.c; sourceTree = "<group>"; };
    4.19 @@ -1142,7 +1140,6 @@
    4.20  				FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */,
    4.21  				044E5FB711E606EB0076F181 /* SDL_clipboard.c */,
    4.22  				0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */,
    4.23 -				FDA6830E0DF2374E00F98A1A /* SDL_leaks.h */,
    4.24  				FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */,
    4.25  				FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */,
    4.26  				FDA683110DF2374E00F98A1A /* SDL_rect.c */,
    4.27 @@ -1213,7 +1210,6 @@
    4.28  				FDA6844E0DF2374E00F98A1A /* SDL_blit.h in Headers */,
    4.29  				FDA684530DF2374E00F98A1A /* SDL_blit_auto.h in Headers */,
    4.30  				FDA684550DF2374E00F98A1A /* SDL_blit_copy.h in Headers */,
    4.31 -				FDA6845B0DF2374E00F98A1A /* SDL_leaks.h in Headers */,
    4.32  				FDA6845D0DF2374E00F98A1A /* SDL_pixels_c.h in Headers */,
    4.33  				FDA684630DF2374E00F98A1A /* SDL_RLEaccel_c.h in Headers */,
    4.34  				FDA684670DF2374E00F98A1A /* SDL_sysvideo.h in Headers */,
     5.1 --- a/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Fri Feb 11 13:06:35 2011 -0800
     5.2 +++ b/Xcode/SDL/SDL.xcodeproj/project.pbxproj	Fri Feb 11 14:23:22 2011 -0800
     5.3 @@ -287,7 +287,6 @@
     5.4  		04BD018112E6671800899322 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5A12E6671800899322 /* SDL_bmp.c */; };
     5.5  		04BD018212E6671800899322 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5B12E6671800899322 /* SDL_clipboard.c */; };
     5.6  		04BD018712E6671800899322 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6012E6671800899322 /* SDL_fillrect.c */; };
     5.7 -		04BD018B12E6671800899322 /* SDL_leaks.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6412E6671800899322 /* SDL_leaks.h */; };
     5.8  		04BD018C12E6671800899322 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6512E6671800899322 /* SDL_pixels.c */; };
     5.9  		04BD018D12E6671800899322 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6612E6671800899322 /* SDL_pixels_c.h */; };
    5.10  		04BD018E12E6671800899322 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6712E6671800899322 /* SDL_rect.c */; };
    5.11 @@ -472,7 +471,6 @@
    5.12  		04BD039B12E6671800899322 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5A12E6671800899322 /* SDL_bmp.c */; };
    5.13  		04BD039C12E6671800899322 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF5B12E6671800899322 /* SDL_clipboard.c */; };
    5.14  		04BD03A112E6671800899322 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6012E6671800899322 /* SDL_fillrect.c */; };
    5.15 -		04BD03A512E6671800899322 /* SDL_leaks.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6412E6671800899322 /* SDL_leaks.h */; };
    5.16  		04BD03A612E6671800899322 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6512E6671800899322 /* SDL_pixels.c */; };
    5.17  		04BD03A712E6671800899322 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BDFF6612E6671800899322 /* SDL_pixels_c.h */; };
    5.18  		04BD03A812E6671800899322 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BDFF6712E6671800899322 /* SDL_rect.c */; };
    5.19 @@ -841,7 +839,6 @@
    5.20  		04BDFF5A12E6671800899322 /* SDL_bmp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_bmp.c; sourceTree = "<group>"; };
    5.21  		04BDFF5B12E6671800899322 /* SDL_clipboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_clipboard.c; sourceTree = "<group>"; };
    5.22  		04BDFF6012E6671800899322 /* SDL_fillrect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_fillrect.c; sourceTree = "<group>"; };
    5.23 -		04BDFF6412E6671800899322 /* SDL_leaks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_leaks.h; sourceTree = "<group>"; };
    5.24  		04BDFF6512E6671800899322 /* SDL_pixels.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_pixels.c; sourceTree = "<group>"; };
    5.25  		04BDFF6612E6671800899322 /* SDL_pixels_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_pixels_c.h; sourceTree = "<group>"; };
    5.26  		04BDFF6712E6671800899322 /* SDL_rect.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_rect.c; sourceTree = "<group>"; };
    5.27 @@ -1516,7 +1513,6 @@
    5.28  				04BDFF5A12E6671800899322 /* SDL_bmp.c */,
    5.29  				04BDFF5B12E6671800899322 /* SDL_clipboard.c */,
    5.30  				04BDFF6012E6671800899322 /* SDL_fillrect.c */,
    5.31 -				04BDFF6412E6671800899322 /* SDL_leaks.h */,
    5.32  				04BDFF6512E6671800899322 /* SDL_pixels.c */,
    5.33  				04BDFF6612E6671800899322 /* SDL_pixels_c.h */,
    5.34  				04BDFF6712E6671800899322 /* SDL_rect.c */,
    5.35 @@ -1885,7 +1881,6 @@
    5.36  				04BD017B12E6671800899322 /* SDL_blit_auto.h in Headers */,
    5.37  				04BD017D12E6671800899322 /* SDL_blit_copy.h in Headers */,
    5.38  				04BD018012E6671800899322 /* SDL_blit_slow.h in Headers */,
    5.39 -				04BD018B12E6671800899322 /* SDL_leaks.h in Headers */,
    5.40  				04BD018D12E6671800899322 /* SDL_pixels_c.h in Headers */,
    5.41  				04BD019712E6671800899322 /* SDL_RLEaccel_c.h in Headers */,
    5.42  				04BD019912E6671800899322 /* SDL_shape_internals.h in Headers */,
    5.43 @@ -2015,7 +2010,6 @@
    5.44  				04BD039512E6671800899322 /* SDL_blit_auto.h in Headers */,
    5.45  				04BD039712E6671800899322 /* SDL_blit_copy.h in Headers */,
    5.46  				04BD039A12E6671800899322 /* SDL_blit_slow.h in Headers */,
    5.47 -				04BD03A512E6671800899322 /* SDL_leaks.h in Headers */,
    5.48  				04BD03A712E6671800899322 /* SDL_pixels_c.h in Headers */,
    5.49  				04BD03B112E6671800899322 /* SDL_RLEaccel_c.h in Headers */,
    5.50  				04BD03B312E6671800899322 /* SDL_shape_internals.h in Headers */,
     6.1 --- a/src/video/SDL_leaks.h	Fri Feb 11 13:06:35 2011 -0800
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,33 +0,0 @@
     6.4 -/*
     6.5 -    SDL - Simple DirectMedia Layer
     6.6 -    Copyright (C) 1997-2010 Sam Lantinga
     6.7 -
     6.8 -    This library is free software; you can redistribute it and/or
     6.9 -    modify it under the terms of the GNU Lesser General Public
    6.10 -    License as published by the Free Software Foundation; either
    6.11 -    version 2.1 of the License, or (at your option) any later version.
    6.12 -
    6.13 -    This library is distributed in the hope that it will be useful,
    6.14 -    but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.15 -    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.16 -    Lesser General Public License for more details.
    6.17 -
    6.18 -    You should have received a copy of the GNU Lesser General Public
    6.19 -    License along with this library; if not, write to the Free Software
    6.20 -    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    6.21 -
    6.22 -    Sam Lantinga
    6.23 -    slouken@libsdl.org
    6.24 -*/
    6.25 -#include "SDL_config.h"
    6.26 -
    6.27 -/* Define this if you want surface leak detection code enabled */
    6.28 -/*#define CHECK_LEAKS*/
    6.29 -
    6.30 -/* Global variables used to check leaks in code using SDL */
    6.31 -
    6.32 -#ifdef CHECK_LEAKS
    6.33 -extern int surfaces_allocated;
    6.34 -#endif
    6.35 -
    6.36 -/* vi: set ts=4 sw=4 expandtab: */
     7.1 --- a/src/video/SDL_surface.c	Fri Feb 11 13:06:35 2011 -0800
     7.2 +++ b/src/video/SDL_surface.c	Fri Feb 11 14:23:22 2011 -0800
     7.3 @@ -145,9 +145,6 @@
     7.4  
     7.5      /* The surface is ready to go */
     7.6      surface->refcount = 1;
     7.7 -#ifdef CHECK_LEAKS
     7.8 -    ++surfaces_allocated;
     7.9 -#endif
    7.10      return surface;
    7.11  }
    7.12  
    7.13 @@ -931,9 +928,6 @@
    7.14          SDL_free(surface->pixels);
    7.15      }
    7.16      SDL_free(surface);
    7.17 -#ifdef CHECK_LEAKS
    7.18 -    --surfaces_allocated;
    7.19 -#endif
    7.20  }
    7.21  
    7.22  /* vi: set ts=4 sw=4 expandtab: */