From 338d1deba96d07da09269a12a3cdf4ffc29ab879 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 13 Apr 2005 23:55:52 +0000 Subject: [PATCH] made wxGridCellAttr dtor protected instead of private git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/grid.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 612eefeaaa..e9b5dbb0c2 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -713,6 +713,14 @@ public: void SetDefAttr(wxGridCellAttr* defAttr) { m_defGridAttr = defAttr; } +protected: + // the dtor is private because only DecRef() can delete us + virtual ~wxGridCellAttr() + { + wxSafeDecRef(m_renderer); + wxSafeDecRef(m_editor); + } + private: enum wxAttrReadMode { @@ -731,12 +739,6 @@ private: // the common part of all ctors void Init(wxGridCellAttr *attrDefault = NULL); - // the dtor is private because only DecRef() can delete us - ~wxGridCellAttr() - { - wxSafeDecRef(m_renderer); - wxSafeDecRef(m_editor); - } // the ref count - when it goes to 0, we die size_t m_nRef; -- 2.50.0