Fixed up darwin/init.m a bit.
This commit is contained in:
parent
7c5740351c
commit
bf67a8b285
|
@ -23,6 +23,12 @@
|
|||
|
||||
@implementation appDelegate
|
||||
|
||||
- (void)dealloc
|
||||
{
|
||||
[self.menuManager release];
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)app
|
||||
{
|
||||
// for debugging
|
||||
|
@ -37,11 +43,6 @@
|
|||
|
||||
@end
|
||||
|
||||
// we are not in control of the actual lifetimes and refcounts of NSViews (see http://stackoverflow.com/a/29523141/3408572)
|
||||
// when we're done with a view, it'll be added as a subview of this one, and this one will be released on application shutdown
|
||||
// we need this separate view because it's possible for controls to have no parent but still be alive
|
||||
NSView *destroyedControlsView;
|
||||
|
||||
uiInitOptions options;
|
||||
|
||||
const char *uiInit(uiInitOptions *o)
|
||||
|
@ -59,9 +60,6 @@ const char *uiInit(uiInitOptions *o)
|
|||
appDelegate().menuManager = [menuManager new];
|
||||
[NSApp setMainMenu:[appDelegate().menuManager makeMenubar]];
|
||||
|
||||
// we can use a stock NSView for this
|
||||
destroyedControlsView = [[NSView alloc] initWithFrame:NSZeroRect];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue