]> git.saurik.com Git - wxWidgets.git/commitdiff
Remove delegates before releasing the native object, so that we don't have delegate...
authorKevin Ollivier <kevino@theolliviers.com>
Mon, 9 Feb 2009 05:22:45 +0000 (05:22 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Mon, 9 Feb 2009 05:22:45 +0000 (05:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/menu.mm
src/osx/cocoa/nonownedwnd.mm
src/osx/cocoa/toolbar.mm

index 312759735621f50f9098742c6b11cce01ed7153e..705fdc89471a776d036c25b3f9072e0a2b223f5c 100644 (file)
@@ -186,6 +186,7 @@ protected :
 
 wxMenuCocoaImpl::~wxMenuCocoaImpl()
 {
+    [m_osxMenu setDelegate:nil];
     [m_osxMenu release];
 }
 
index f442eef85a0c6808a251cd2c91a6c6278084001e..ac233c8e19cac51c9d10f5e2f102a5e620640e45 100644 (file)
@@ -227,6 +227,7 @@ wxNonOwnedWindowCocoaImpl::wxNonOwnedWindowCocoaImpl()
     
 wxNonOwnedWindowCocoaImpl::~wxNonOwnedWindowCocoaImpl()
 {
+    [m_macWindow setDelegate:nil];
     [m_macWindow release];
 }
 
index 50ff8949a48e9508ec9a98fc9cf68e6d6c1454e3..b93b614850563e5c0431b4282048fe45f366bfb8 100644 (file)
@@ -633,6 +633,7 @@ wxToolBar::~wxToolBar()
         if (m_macUsesNativeToolbar)
             MacInstallNativeToolbar( false );
 
+        [(NSToolbar*)m_macToolbar setDelegate:nil];
         [(NSToolbar*)m_macToolbar release];
         m_macToolbar = NULL;
     }