destructor must zero out fields that are WXGC_IGNOREd
svn: r4975
This commit is contained in:
parent
ee88a04972
commit
c6d593419b
|
@ -24,6 +24,7 @@ wxMacDC::wxMacDC(CGrafPtr port)
|
|||
//-----------------------------------------------------------------------------
|
||||
wxMacDC::~wxMacDC(void) // destructor
|
||||
{
|
||||
cCurrentUser = NULL;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -194,11 +194,13 @@ wxMenu::~wxMenu(void)
|
|||
wxNode* node;
|
||||
wxMenuItem* item;
|
||||
|
||||
if (menu_bar) // may have to remove menu from the current mac menu bar
|
||||
{
|
||||
if (menu_bar) { // may have to remove menu from the current mac menu bar
|
||||
menu_bar->Delete(this);
|
||||
} else if (window_parent)
|
||||
menu_bar = NULL;
|
||||
} else if (window_parent) {
|
||||
((wxMenu *)window_parent)->Delete(this, 0, -1);
|
||||
window_parent = NULL;
|
||||
}
|
||||
|
||||
::DisposeMenu(cMacMenu); // does not dispose of submenus
|
||||
|
||||
|
|
|
@ -115,11 +115,15 @@ wxPrintData::wxPrintData(void)
|
|||
|
||||
wxPrintData::~wxPrintData(void)
|
||||
{
|
||||
if (cPrintSettings)
|
||||
if (cPrintSettings) {
|
||||
PMRelease(cPrintSettings);
|
||||
cPrintSettings = NULL;
|
||||
}
|
||||
|
||||
if (cPageFormat)
|
||||
if (cPageFormat) {
|
||||
PMRelease(cPageFormat);
|
||||
cPageFormat = NULL;
|
||||
}
|
||||
|
||||
if (cPrintSession) {
|
||||
PMRelease(cPrintSession);
|
||||
|
|
|
@ -363,6 +363,11 @@ wxWindow::~wxWindow(void) // Destructor
|
|||
DisposeControl(cPaintControl);
|
||||
cPaintControl = NULL;
|
||||
}
|
||||
|
||||
/* Must zero out fieldsd that are WXGC_IGNOREd: */
|
||||
cParentArea = NULL;
|
||||
cMacDC = NULL;
|
||||
window_parent = NULL;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
|
|
@ -153,6 +153,8 @@ wxbMenu::wxbMenu (char *Title, wxFunction WXUNUSED(func))
|
|||
// The wxWindow destructor will take care of deleting the submenus.
|
||||
wxbMenu::~wxbMenu (void)
|
||||
{
|
||||
menu_bar= NULL;
|
||||
top_level_menu = NULL;
|
||||
}
|
||||
|
||||
wxMenuItem *wxbMenu::FindItemForId (long itemId, wxMenu ** itemMenu, int * pos)
|
||||
|
@ -252,6 +254,7 @@ wxbMenuBar::wxbMenuBar (int N, wxMenu * Menus[], char *Titles[])
|
|||
|
||||
wxbMenuBar::~wxbMenuBar (void)
|
||||
{
|
||||
menu_bar_frame = NULL;
|
||||
}
|
||||
|
||||
void wxbMenuBar::Append (wxMenu * menu, char *title)
|
||||
|
|
|
@ -466,6 +466,7 @@ wxCombo::wxCombo(wxWindow *for_canvas,
|
|||
|
||||
wxCombo::~wxCombo(void)
|
||||
{
|
||||
forCanvas = NULL;
|
||||
}
|
||||
|
||||
Bool wxCombo::PreOnEvent(wxWindow *win, wxMouseEvent *e)
|
||||
|
|
Loading…
Reference in New Issue
Block a user