X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fc77f30f423b59b826103bd28c57a437c1553ab..25a4727e95b45c520ecc6511a9211f16cd70cbc0:/src/cocoa/toplevel.mm 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]; } // ----------------------------------------------------------------------------