Do proper cleanup of event handlers in wxWebKitCtrl and wxMacUnicodeTextCtrl, and unset the window focus when destroying a top level window to ensure that controls do not receive events after the wx portion of the control has been destroyed.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@56767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2008-11-14 23:02:15 +00:00
parent 85c62cec4d
commit 085dae419f
5 changed files with 26 additions and 3 deletions

View File

@@ -468,7 +468,16 @@ bool wxWebKitCtrl::Create(wxWindow *parent,
wxWebKitCtrl::~wxWebKitCtrl()
{
MyFrameLoadMonitor* myFrameLoadMonitor = [m_webView frameLoadDelegate];
MyPolicyDelegate* myPolicyDelegate = [m_webView policyDelegate];
[m_webView setFrameLoadDelegate: nil];
[m_webView setPolicyDelegate: nil];
if (myFrameLoadMonitor)
[myFrameLoadMonitor release];
if (myPolicyDelegate)
[myPolicyDelegate release];
}
// ----------------------------------------------------------------------------