Don't delete model in views destructor as several

views can have the same model and memory doesn't
    like getting freed several times.
  Sorting actually works. Not yet editing the sorted
    data.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-02-28 21:41:13 +00:00
parent 8f850e2831
commit 241cb04bd8
2 changed files with 136 additions and 7 deletions

View File

@@ -431,15 +431,10 @@ wxDataViewCtrlBase::wxDataViewCtrlBase()
wxDataViewCtrlBase::~wxDataViewCtrlBase()
{
if (m_model)
delete m_model;
}
bool wxDataViewCtrlBase::AssociateModel( wxDataViewListModel *model )
{
if (m_model)
delete m_model;
m_model = model;
return true;