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@12527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,14 +67,10 @@ wxPenRefData::~wxPenRefData()
|
||||
|
||||
wxPen::wxPen()
|
||||
{
|
||||
if (wxThePenList)
|
||||
wxThePenList->AddPen(this);
|
||||
}
|
||||
|
||||
wxPen::~wxPen()
|
||||
{
|
||||
if (wxThePenList)
|
||||
wxThePenList->RemovePen(this);
|
||||
}
|
||||
|
||||
// Should implement Create
|
||||
@@ -117,8 +113,6 @@ wxPen::wxPen(const wxColour& col, int Width, int Style)
|
||||
#endif
|
||||
RealizeResource();
|
||||
|
||||
if ( wxThePenList )
|
||||
wxThePenList->AddPen(this);
|
||||
}
|
||||
|
||||
wxPen::wxPen(const wxBitmap& stipple, int Width)
|
||||
@@ -137,8 +131,6 @@ wxPen::wxPen(const wxBitmap& stipple, int Width)
|
||||
|
||||
RealizeResource();
|
||||
|
||||
if (wxThePenList)
|
||||
wxThePenList->AddPen(this);
|
||||
}
|
||||
|
||||
bool wxPen::RealizeResource()
|
||||
|
Reference in New Issue
Block a user