Remove delegates before releasing the native object, so that we don't have delegate methods getting called during destruction.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -186,6 +186,7 @@ protected :
|
||||
|
||||
wxMenuCocoaImpl::~wxMenuCocoaImpl()
|
||||
{
|
||||
[m_osxMenu setDelegate:nil];
|
||||
[m_osxMenu release];
|
||||
}
|
||||
|
||||
|
@@ -227,6 +227,7 @@ wxNonOwnedWindowCocoaImpl::wxNonOwnedWindowCocoaImpl()
|
||||
|
||||
wxNonOwnedWindowCocoaImpl::~wxNonOwnedWindowCocoaImpl()
|
||||
{
|
||||
[m_macWindow setDelegate:nil];
|
||||
[m_macWindow release];
|
||||
}
|
||||
|
||||
|
@@ -633,6 +633,7 @@ wxToolBar::~wxToolBar()
|
||||
if (m_macUsesNativeToolbar)
|
||||
MacInstallNativeToolbar( false );
|
||||
|
||||
[(NSToolbar*)m_macToolbar setDelegate:nil];
|
||||
[(NSToolbar*)m_macToolbar release];
|
||||
m_macToolbar = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user