comparison src/video/quartz/SDL_QuartzGL.m @ 1160:72c6c3e5bb85

Closed a memory leak caused when quitting video subsystem on Quartz target.
author Ryan C. Gordon <icculus@icculus.org>
date Thu, 13 Oct 2005 09:47:06 +0000
parents c3c8739f7844
children e967ab22e6fd
comparison
equal deleted inserted replaced
1159:787b8d2c23e4 1160:72c6c3e5bb85
116 return 0; 116 return 0;
117 } 117 }
118 118
119 gl_context = [ [ NSOpenGLContext alloc ] initWithFormat:fmt 119 gl_context = [ [ NSOpenGLContext alloc ] initWithFormat:fmt
120 shareContext:nil]; 120 shareContext:nil];
121
122 [ fmt release ];
121 123
122 if (gl_context == nil) { 124 if (gl_context == nil) {
123 SDL_SetError ("Failed creating OpenGL context"); 125 SDL_SetError ("Failed creating OpenGL context");
124 return 0; 126 return 0;
125 } 127 }
149 151
150 /* End Wisdom from Apple Engineer section. --ryan. */ 152 /* End Wisdom from Apple Engineer section. --ryan. */
151 153
152 /* Convince SDL that the GL "driver" is loaded */ 154 /* Convince SDL that the GL "driver" is loaded */
153 this->gl_config.driver_loaded = 1; 155 this->gl_config.driver_loaded = 1;
154
155 [ fmt release ];
156 156
157 return 1; 157 return 1;
158 } 158 }
159 159
160 void QZ_TearDownOpenGL (_THIS) { 160 void QZ_TearDownOpenGL (_THIS) {