Commit 91ccaf4d authored by Ryan C. Gordon's avatar Ryan C. Gordon

Closed a memory leak caused when quitting video subsystem on Quartz target.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401163
parent 4d7c808a
...@@ -119,6 +119,8 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) { ...@@ -119,6 +119,8 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) {
gl_context = [ [ NSOpenGLContext alloc ] initWithFormat:fmt gl_context = [ [ NSOpenGLContext alloc ] initWithFormat:fmt
shareContext:nil]; shareContext:nil];
[ fmt release ];
if (gl_context == nil) { if (gl_context == nil) {
SDL_SetError ("Failed creating OpenGL context"); SDL_SetError ("Failed creating OpenGL context");
return 0; return 0;
...@@ -152,8 +154,6 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) { ...@@ -152,8 +154,6 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) {
/* Convince SDL that the GL "driver" is loaded */ /* Convince SDL that the GL "driver" is loaded */
this->gl_config.driver_loaded = 1; this->gl_config.driver_loaded = 1;
[ fmt release ];
return 1; return 1;
} }
......
...@@ -487,9 +487,10 @@ static void QZ_UnsetVideoMode (_THIS) { ...@@ -487,9 +487,10 @@ static void QZ_UnsetVideoMode (_THIS) {
else { else {
[ qz_window close ]; [ qz_window close ];
[ qz_window release ];
qz_window = nil; qz_window = nil;
window_view = nil; window_view = nil;
/* Release the OpenGL context */ /* Release the OpenGL context */
if ( mode_flags & SDL_OPENGL ) if ( mode_flags & SDL_OPENGL )
QZ_TearDownOpenGL (this); QZ_TearDownOpenGL (this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment