don't use wxTheXXXList in wxXXX ctor/dtor, only objects explicitly created

with FindOrCreateXXX() are managed by the lists


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Gilles Depeyrot 2001-12-01 08:17:03 +00:00
parent 9929591c13
commit 4b796bb03c
4 changed files with 0 additions and 40 deletions

View File

@ -40,14 +40,10 @@ wxBrushRefData::~wxBrushRefData()
// Brushes
wxBrush::wxBrush()
{
if ( wxTheBrushList )
wxTheBrushList->AddBrush(this);
}
wxBrush::~wxBrush()
{
if ( wxTheBrushList )
wxTheBrushList->RemoveBrush(this);
}
wxBrush::wxBrush(const wxColour& col, int Style)
@ -58,9 +54,6 @@ wxBrush::wxBrush(const wxColour& col, int Style)
M_BRUSHDATA->m_style = Style;
RealizeResource();
if ( wxTheBrushList )
wxTheBrushList->AddBrush(this);
}
wxBrush::wxBrush(const wxBitmap& stipple)
@ -71,9 +64,6 @@ wxBrush::wxBrush(const wxBitmap& stipple)
M_BRUSHDATA->m_stipple = stipple;
RealizeResource();
if ( wxTheBrushList )
wxTheBrushList->AddBrush(this);
}
void wxBrush::Unshare()

View File

@ -40,14 +40,10 @@ wxBrushRefData::~wxBrushRefData()
// Brushes
wxBrush::wxBrush()
{
if ( wxTheBrushList )
wxTheBrushList->AddBrush(this);
}
wxBrush::~wxBrush()
{
if ( wxTheBrushList )
wxTheBrushList->RemoveBrush(this);
}
wxBrush::wxBrush(const wxColour& col, int Style)
@ -58,9 +54,6 @@ wxBrush::wxBrush(const wxColour& col, int Style)
M_BRUSHDATA->m_style = Style;
RealizeResource();
if ( wxTheBrushList )
wxTheBrushList->AddBrush(this);
}
wxBrush::wxBrush(const wxBitmap& stipple)
@ -71,9 +64,6 @@ wxBrush::wxBrush(const wxBitmap& stipple)
M_BRUSHDATA->m_stipple = stipple;
RealizeResource();
if ( wxTheBrushList )
wxTheBrushList->AddBrush(this);
}
void wxBrush::Unshare()

View File

@ -50,14 +50,10 @@ wxPenRefData::~wxPenRefData()
wxPen::wxPen()
{
if ( wxThePenList )
wxThePenList->AddPen(this);
}
wxPen::~wxPen()
{
if (wxThePenList)
wxThePenList->RemovePen(this);
}
// Should implement Create
@ -74,9 +70,6 @@ wxPen::wxPen(const wxColour& col, int Width, int Style)
M_PENDATA->m_dash = 0 ;
RealizeResource();
if ( wxThePenList )
wxThePenList->AddPen(this);
}
wxPen::wxPen(const wxBitmap& stipple, int Width)
@ -92,9 +85,6 @@ wxPen::wxPen(const wxBitmap& stipple, int Width)
M_PENDATA->m_dash = 0 ;
RealizeResource();
if ( wxThePenList )
wxThePenList->AddPen(this);
}
void wxPen::Unshare()

View File

@ -50,14 +50,10 @@ wxPenRefData::~wxPenRefData()
wxPen::wxPen()
{
if ( wxThePenList )
wxThePenList->AddPen(this);
}
wxPen::~wxPen()
{
if (wxThePenList)
wxThePenList->RemovePen(this);
}
// Should implement Create
@ -74,9 +70,6 @@ wxPen::wxPen(const wxColour& col, int Width, int Style)
M_PENDATA->m_dash = 0 ;
RealizeResource();
if ( wxThePenList )
wxThePenList->AddPen(this);
}
wxPen::wxPen(const wxBitmap& stipple, int Width)
@ -92,9 +85,6 @@ wxPen::wxPen(const wxBitmap& stipple, int Width)
M_PENDATA->m_dash = 0 ;
RealizeResource();
if ( wxThePenList )
wxThePenList->AddPen(this);
}
void wxPen::Unshare()