From 0b659b0a51c13cdc4ed21f3f8c020c5055c6c024 Mon Sep 17 00:00:00 2001 From: David Elliott Date: Tue, 5 Aug 2003 15:58:39 +0000 Subject: [PATCH] In destructor: DestroyChildren() and make sure m_cocoaNSView is NULL so that the ~wxWindow destructor will not try to remove it from its superview (BAD!) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/toplevel.mm | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/cocoa/toplevel.mm b/src/cocoa/toplevel.mm index c4bfd67a41..4c138ca8f0 100644 --- a/src/cocoa/toplevel.mm +++ b/src/cocoa/toplevel.mm @@ -98,12 +98,8 @@ bool wxTopLevelWindowCocoa::Create(wxWindow *parent, wxTopLevelWindowCocoa::~wxTopLevelWindowCocoa() { wxAutoNSAutoreleasePool pool; - // Hand ownership of the content view to wxWindow so it can destroy - // itself properly. - NSView *view = [m_cocoaNSView retain]; + DestroyChildren(); SetNSWindow(NULL); - SetNSView(view); - [view release]; } // ----------------------------------------------------------------------------