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:
@@ -40,14 +40,10 @@ wxBrushRefData::~wxBrushRefData()
|
|||||||
// Brushes
|
// Brushes
|
||||||
wxBrush::wxBrush()
|
wxBrush::wxBrush()
|
||||||
{
|
{
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->AddBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::~wxBrush()
|
wxBrush::~wxBrush()
|
||||||
{
|
{
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->RemoveBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxColour& col, int Style)
|
wxBrush::wxBrush(const wxColour& col, int Style)
|
||||||
@@ -58,9 +54,6 @@ wxBrush::wxBrush(const wxColour& col, int Style)
|
|||||||
M_BRUSHDATA->m_style = Style;
|
M_BRUSHDATA->m_style = Style;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->AddBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxBitmap& stipple)
|
wxBrush::wxBrush(const wxBitmap& stipple)
|
||||||
@@ -71,9 +64,6 @@ wxBrush::wxBrush(const wxBitmap& stipple)
|
|||||||
M_BRUSHDATA->m_stipple = stipple;
|
M_BRUSHDATA->m_stipple = stipple;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->AddBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::Unshare()
|
void wxBrush::Unshare()
|
||||||
|
@@ -40,14 +40,10 @@ wxBrushRefData::~wxBrushRefData()
|
|||||||
// Brushes
|
// Brushes
|
||||||
wxBrush::wxBrush()
|
wxBrush::wxBrush()
|
||||||
{
|
{
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->AddBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::~wxBrush()
|
wxBrush::~wxBrush()
|
||||||
{
|
{
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->RemoveBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxColour& col, int Style)
|
wxBrush::wxBrush(const wxColour& col, int Style)
|
||||||
@@ -58,9 +54,6 @@ wxBrush::wxBrush(const wxColour& col, int Style)
|
|||||||
M_BRUSHDATA->m_style = Style;
|
M_BRUSHDATA->m_style = Style;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->AddBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxBitmap& stipple)
|
wxBrush::wxBrush(const wxBitmap& stipple)
|
||||||
@@ -71,9 +64,6 @@ wxBrush::wxBrush(const wxBitmap& stipple)
|
|||||||
M_BRUSHDATA->m_stipple = stipple;
|
M_BRUSHDATA->m_stipple = stipple;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxTheBrushList )
|
|
||||||
wxTheBrushList->AddBrush(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::Unshare()
|
void wxBrush::Unshare()
|
||||||
|
@@ -50,14 +50,10 @@ wxPenRefData::~wxPenRefData()
|
|||||||
|
|
||||||
wxPen::wxPen()
|
wxPen::wxPen()
|
||||||
{
|
{
|
||||||
if ( wxThePenList )
|
|
||||||
wxThePenList->AddPen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::~wxPen()
|
wxPen::~wxPen()
|
||||||
{
|
{
|
||||||
if (wxThePenList)
|
|
||||||
wxThePenList->RemovePen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should implement Create
|
// Should implement Create
|
||||||
@@ -74,9 +70,6 @@ wxPen::wxPen(const wxColour& col, int Width, int Style)
|
|||||||
M_PENDATA->m_dash = 0 ;
|
M_PENDATA->m_dash = 0 ;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxThePenList )
|
|
||||||
wxThePenList->AddPen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::wxPen(const wxBitmap& stipple, int Width)
|
wxPen::wxPen(const wxBitmap& stipple, int Width)
|
||||||
@@ -92,9 +85,6 @@ wxPen::wxPen(const wxBitmap& stipple, int Width)
|
|||||||
M_PENDATA->m_dash = 0 ;
|
M_PENDATA->m_dash = 0 ;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxThePenList )
|
|
||||||
wxThePenList->AddPen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPen::Unshare()
|
void wxPen::Unshare()
|
||||||
|
@@ -50,14 +50,10 @@ wxPenRefData::~wxPenRefData()
|
|||||||
|
|
||||||
wxPen::wxPen()
|
wxPen::wxPen()
|
||||||
{
|
{
|
||||||
if ( wxThePenList )
|
|
||||||
wxThePenList->AddPen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::~wxPen()
|
wxPen::~wxPen()
|
||||||
{
|
{
|
||||||
if (wxThePenList)
|
|
||||||
wxThePenList->RemovePen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Should implement Create
|
// Should implement Create
|
||||||
@@ -74,9 +70,6 @@ wxPen::wxPen(const wxColour& col, int Width, int Style)
|
|||||||
M_PENDATA->m_dash = 0 ;
|
M_PENDATA->m_dash = 0 ;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxThePenList )
|
|
||||||
wxThePenList->AddPen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPen::wxPen(const wxBitmap& stipple, int Width)
|
wxPen::wxPen(const wxBitmap& stipple, int Width)
|
||||||
@@ -92,9 +85,6 @@ wxPen::wxPen(const wxBitmap& stipple, int Width)
|
|||||||
M_PENDATA->m_dash = 0 ;
|
M_PENDATA->m_dash = 0 ;
|
||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
if ( wxThePenList )
|
|
||||||
wxThePenList->AddPen(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPen::Unshare()
|
void wxPen::Unshare()
|
||||||
|
Reference in New Issue
Block a user