From 4b796bb03c1410ebda4b010130fb022a8729a68f Mon Sep 17 00:00:00 2001 From: Gilles Depeyrot Date: Sat, 1 Dec 2001 08:17:03 +0000 Subject: [PATCH] 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 --- src/mac/brush.cpp | 10 ---------- src/mac/carbon/brush.cpp | 10 ---------- src/mac/carbon/pen.cpp | 10 ---------- src/mac/pen.cpp | 10 ---------- 4 files changed, 40 deletions(-) diff --git a/src/mac/brush.cpp b/src/mac/brush.cpp index cb9d76d1ab..f9e14bad6b 100644 --- a/src/mac/brush.cpp +++ b/src/mac/brush.cpp @@ -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() diff --git a/src/mac/carbon/brush.cpp b/src/mac/carbon/brush.cpp index cb9d76d1ab..f9e14bad6b 100644 --- a/src/mac/carbon/brush.cpp +++ b/src/mac/carbon/brush.cpp @@ -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() diff --git a/src/mac/carbon/pen.cpp b/src/mac/carbon/pen.cpp index 356fedcd6c..732889b467 100644 --- a/src/mac/carbon/pen.cpp +++ b/src/mac/carbon/pen.cpp @@ -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() diff --git a/src/mac/pen.cpp b/src/mac/pen.cpp index 356fedcd6c..732889b467 100644 --- a/src/mac/pen.cpp +++ b/src/mac/pen.cpp @@ -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()