mirror of https://github.com/bsnes-emu/bsnes.git
Fixed several memory leaks (mostly in Cocoa port debugging utils)
This commit is contained in:
parent
7a41a9b417
commit
78446f0ed4
|
@ -157,7 +157,11 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
|||
self.view.mouseHidingEnabled = (self.mainWindow.styleMask & NSFullScreenWindowMask) != 0;
|
||||
[self.view flip];
|
||||
GB_set_pixels_output(&gb, self.view.pixels);
|
||||
[self reloadVRAMData: nil];
|
||||
if (self.vramWindow.isVisible) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self reloadVRAMData: nil];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
- (void) run
|
||||
|
@ -734,8 +738,13 @@ static void printImage(GB_gameboy_t *gb, uint32_t *image, uint8_t height,
|
|||
NULL,
|
||||
YES,
|
||||
renderingIntent);
|
||||
CGDataProviderRelease(provider);
|
||||
CGColorSpaceRelease(colorSpaceRef);
|
||||
|
||||
return [[NSImage alloc] initWithCGImage:iref size:NSMakeSize(width * scale, height * scale)];
|
||||
NSImage *ret = [[NSImage alloc] initWithCGImage:iref size:NSMakeSize(width * scale, height * scale)];
|
||||
CGImageRelease(iref);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (void) reloadMemoryView
|
||||
|
|
|
@ -137,7 +137,7 @@ void GB_free(GB_gameboy_t *gb)
|
|||
}
|
||||
}
|
||||
for (int i = 0x400; i--;) {
|
||||
if (gb->reversed_symbol_map.buckets[i]) {
|
||||
while (gb->reversed_symbol_map.buckets[i]) {
|
||||
GB_symbol_t *next = gb->reversed_symbol_map.buckets[i]->next;
|
||||
free(gb->reversed_symbol_map.buckets[i]);
|
||||
gb->reversed_symbol_map.buckets[i] = next;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
[_backgroundColor release];
|
||||
[_bookmarkStarts release];
|
||||
[_bookmarkExtents release];
|
||||
[_bookmarkEnds release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue