mirror of https://github.com/bsnes-emu/bsnes.git
Fixed Cocoa memory leak
This commit is contained in:
parent
1d35c04ab1
commit
b740b7f3ba
|
@ -126,6 +126,7 @@ static uint32_t rgbEncode(GB_gameboy_t *gb, uint8_t r, uint8_t g, uint8_t b)
|
|||
GB_run(&gb);
|
||||
}
|
||||
[self.audioClient stop];
|
||||
self.audioClient = nil;
|
||||
self.view.mouseHidingEnabled = NO;
|
||||
GB_save_battery(&gb, [[[self.fileName stringByDeletingPathExtension] stringByAppendingPathExtension:@"sav"] UTF8String]);
|
||||
stopping = false;
|
||||
|
|
|
@ -160,6 +160,10 @@ void main(void) {\n\
|
|||
glDeleteProgram(program);
|
||||
glDeleteTextures(1, &texture);
|
||||
glDeleteTextures(1, &previous_texture);
|
||||
|
||||
/* OpenGL is black magic. Closing one view causes others to be completely black unless we reload their shaders */
|
||||
/* We're probably not freeing thing in the right place. */
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:@"GBFilterChanged" object:nil];
|
||||
}
|
||||
|
||||
+ (GLuint)shaderWithContents:(NSString*)contents type:(GLenum)type
|
||||
|
|
Loading…
Reference in New Issue