From b3ba1043299d50543aca2d4b9ca154f07402b841 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Thu, 2 Jul 2009 14:52:12 +0000 Subject: [PATCH] fixing memory leak and unnecessary cocoa init, refs #10856 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/carbon/colordlgosx.mm | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/osx/carbon/colordlgosx.mm b/src/osx/carbon/colordlgosx.mm index 0dc098887f..f1093c4391 100644 --- a/src/osx/carbon/colordlgosx.mm +++ b/src/osx/carbon/colordlgosx.mm @@ -106,18 +106,6 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) if (data) m_colourData = *data; - // - // This is the key call - this initializes - // events and window stuff for cocoa for carbon - // applications. - // - // This is also the only call here that is - // 10.2+ specific (the rest is OSX only), - // which, ironically, the carbon font - // panel requires. - // - bool bOK = NSApplicationLoad(); - //autorelease pool - req'd for carbon NSAutoreleasePool *thePool; thePool = [[NSAutoreleasePool alloc] init]; @@ -135,7 +123,7 @@ bool wxColourDialog::Create(wxWindow *parent, wxColourData *data) //We're done - free up the pool [thePool release]; - return bOK; + return true; } int wxColourDialog::ShowModal() { @@ -170,6 +158,7 @@ int wxColourDialog::ShowModal() [NSApp endModalSession:session]; //free up the memory for the delegates - we don't need them anymore + [theColorPanel setDelegate:nil]; [theCPDelegate release]; //Get the shared color panel along with the chosen color and set the chosen color -- 2.45.2