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
|
wxMacDC::~wxMacDC(void) // destructor
|
||||||
{
|
{
|
||||||
|
cCurrentUser = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
@ -194,11 +194,13 @@ wxMenu::~wxMenu(void)
|
||||||
wxNode* node;
|
wxNode* node;
|
||||||
wxMenuItem* item;
|
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);
|
||||||
menu_bar->Delete(this);
|
menu_bar = NULL;
|
||||||
} else if (window_parent)
|
} else if (window_parent) {
|
||||||
((wxMenu *)window_parent)->Delete(this, 0, -1);
|
((wxMenu *)window_parent)->Delete(this, 0, -1);
|
||||||
|
window_parent = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
::DisposeMenu(cMacMenu); // does not dispose of submenus
|
::DisposeMenu(cMacMenu); // does not dispose of submenus
|
||||||
|
|
||||||
|
|
|
@ -115,11 +115,15 @@ wxPrintData::wxPrintData(void)
|
||||||
|
|
||||||
wxPrintData::~wxPrintData(void)
|
wxPrintData::~wxPrintData(void)
|
||||||
{
|
{
|
||||||
if (cPrintSettings)
|
if (cPrintSettings) {
|
||||||
PMRelease(cPrintSettings);
|
PMRelease(cPrintSettings);
|
||||||
|
cPrintSettings = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (cPageFormat)
|
if (cPageFormat) {
|
||||||
PMRelease(cPageFormat);
|
PMRelease(cPageFormat);
|
||||||
|
cPageFormat = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (cPrintSession) {
|
if (cPrintSession) {
|
||||||
PMRelease(cPrintSession);
|
PMRelease(cPrintSession);
|
||||||
|
|
|
@ -363,6 +363,11 @@ wxWindow::~wxWindow(void) // Destructor
|
||||||
DisposeControl(cPaintControl);
|
DisposeControl(cPaintControl);
|
||||||
cPaintControl = NULL;
|
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.
|
// The wxWindow destructor will take care of deleting the submenus.
|
||||||
wxbMenu::~wxbMenu (void)
|
wxbMenu::~wxbMenu (void)
|
||||||
{
|
{
|
||||||
|
menu_bar= NULL;
|
||||||
|
top_level_menu = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenuItem *wxbMenu::FindItemForId (long itemId, wxMenu ** itemMenu, int * pos)
|
wxMenuItem *wxbMenu::FindItemForId (long itemId, wxMenu ** itemMenu, int * pos)
|
||||||
|
@ -252,6 +254,7 @@ wxbMenuBar::wxbMenuBar (int N, wxMenu * Menus[], char *Titles[])
|
||||||
|
|
||||||
wxbMenuBar::~wxbMenuBar (void)
|
wxbMenuBar::~wxbMenuBar (void)
|
||||||
{
|
{
|
||||||
|
menu_bar_frame = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxbMenuBar::Append (wxMenu * menu, char *title)
|
void wxbMenuBar::Append (wxMenu * menu, char *title)
|
||||||
|
|
|
@ -466,6 +466,7 @@ wxCombo::wxCombo(wxWindow *for_canvas,
|
||||||
|
|
||||||
wxCombo::~wxCombo(void)
|
wxCombo::~wxCombo(void)
|
||||||
{
|
{
|
||||||
|
forCanvas = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool wxCombo::PreOnEvent(wxWindow *win, wxMouseEvent *e)
|
Bool wxCombo::PreOnEvent(wxWindow *win, wxMouseEvent *e)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user