mirror of
https://github.com/holub/mame
synced 2025-04-21 16:01:56 +03:00
Fix Cocoa debugger leaks with SDL2, still looking into crash on exit
This commit is contained in:
parent
a469d29eb8
commit
cb10350dd4
@ -82,6 +82,7 @@ int debugger_osx::init()
|
||||
|
||||
void debugger_osx::exit()
|
||||
{
|
||||
NSAutoreleasePool *const pool = [[NSAutoreleasePool alloc] init];
|
||||
if (m_console)
|
||||
{
|
||||
NSDictionary *info = [NSDictionary dictionaryWithObject:[NSValue valueWithPointer:m_machine]
|
||||
@ -93,6 +94,7 @@ void debugger_osx::exit()
|
||||
m_console = nil;
|
||||
m_machine = NULL;
|
||||
}
|
||||
[pool release];
|
||||
}
|
||||
|
||||
//============================================================
|
||||
@ -110,6 +112,8 @@ void debugger_osx::init_debugger(running_machine &machine)
|
||||
|
||||
void debugger_osx::wait_for_debugger(device_t &device, bool firststop)
|
||||
{
|
||||
NSAutoreleasePool *const pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
// create a console window
|
||||
if (m_console == nil)
|
||||
m_console = [[MAMEDebugConsole alloc] initWithMachine:*m_machine];
|
||||
@ -134,6 +138,8 @@ void debugger_osx::wait_for_debugger(device_t &device, bool firststop)
|
||||
dequeue:YES];
|
||||
if (ev != nil)
|
||||
[NSApp sendEvent:ev];
|
||||
|
||||
[pool release];
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,9 @@ static NSCharacterSet *NonWhiteCharacters;
|
||||
|
||||
static void debugwin_view_update(debug_view &view, void *osdprivate)
|
||||
{
|
||||
NSAutoreleasePool *const pool = [[NSAutoreleasePool alloc] init];
|
||||
[(MAMEDebugView *)osdprivate update];
|
||||
[pool release];
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user