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
This commit is contained in:
David Elliott 2003-08-05 15:58:39 +00:00
parent 29c310fe05
commit 0b659b0a51

View File

@ -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];
}
// ----------------------------------------------------------------------------