X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0dba08dd3987303ff116bf77d5fb877b6d8f32d0..97e49559fb0e1dfc43d66e8784ec47182f5507e9:/src/motif/frame.cpp diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index 184daa28e0..51755c4a1e 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -91,8 +91,6 @@ BEGIN_EVENT_TABLE(wxFrame, wxFrameBase) EVT_SYS_COLOUR_CHANGED(wxFrame::OnSysColourChanged) END_EVENT_TABLE() -IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow) - // ============================================================================ // implementation // ============================================================================ @@ -253,7 +251,7 @@ bool wxFrame::XmDoCreateTLW(wxWindow* WXUNUSED(parent), wxFrame::~wxFrame() { - m_isBeingDeleted = true; + SendDestroyEvent(); if (m_clientArea) { @@ -267,15 +265,10 @@ wxFrame::~wxFrame() if (m_frameMenuBar) { m_frameMenuBar->DestroyMenuBar(); - delete m_frameMenuBar; - m_frameMenuBar = NULL; + wxDELETE(m_frameMenuBar); } - if (m_frameStatusBar) - { - delete m_frameStatusBar; - m_frameStatusBar = NULL; - } + wxDELETE(m_frameStatusBar); PreDestroy(); @@ -508,7 +501,7 @@ void wxFrame::SetMenuBar(wxMenuBar *menuBar) } // Currently can't set it twice - // wxASSERT_MSG( (m_frameMenuBar == (wxMenuBar*) NULL), "Cannot set the menubar more than once"); + // wxASSERT_MSG( (m_frameMenuBar == NULL), "Cannot set the menubar more than once"); if (m_frameMenuBar) {