# HG changeset patch # User Ryan C. Gordon # Date 1129196826 0 # Node ID 72c6c3e5bb85c879a745430bc98b422a6ce68ce3 # Parent 787b8d2c23e4a2bda31b30984581dc336640797e Closed a memory leak caused when quitting video subsystem on Quartz target. diff -r 787b8d2c23e4 -r 72c6c3e5bb85 src/video/quartz/SDL_QuartzGL.m --- a/src/video/quartz/SDL_QuartzGL.m Tue Oct 11 23:57:04 2005 +0000 +++ b/src/video/quartz/SDL_QuartzGL.m Thu Oct 13 09:47:06 2005 +0000 @@ -119,6 +119,8 @@ gl_context = [ [ NSOpenGLContext alloc ] initWithFormat:fmt shareContext:nil]; + [ fmt release ]; + if (gl_context == nil) { SDL_SetError ("Failed creating OpenGL context"); return 0; @@ -152,8 +154,6 @@ /* Convince SDL that the GL "driver" is loaded */ this->gl_config.driver_loaded = 1; - [ fmt release ]; - return 1; } diff -r 787b8d2c23e4 -r 72c6c3e5bb85 src/video/quartz/SDL_QuartzVideo.m --- a/src/video/quartz/SDL_QuartzVideo.m Tue Oct 11 23:57:04 2005 +0000 +++ b/src/video/quartz/SDL_QuartzVideo.m Thu Oct 13 09:47:06 2005 +0000 @@ -487,9 +487,10 @@ else { [ qz_window close ]; + [ qz_window release ]; qz_window = nil; window_view = nil; - + /* Release the OpenGL context */ if ( mode_flags & SDL_OPENGL ) QZ_TearDownOpenGL (this);