From cee89508d38bd3e06871040ce1ef53d207e6c81a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 7 Dec 2018 04:14:59 +0100 Subject: [PATCH] Simply destroying row heights cache There is no reason to neither check that the pointer is non-null nor to call Clear() on it before deleting it, so don't do it. --- src/generic/datavgen.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 1c601f583f..34e6237a16 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -1992,11 +1992,7 @@ wxDataViewMainWindow::~wxDataViewMainWindow() { DestroyTree(); delete m_renameTimer; - if (m_rowHeightCache != NULL) - { - m_rowHeightCache->Clear(); - delete m_rowHeightCache; - } + delete m_rowHeightCache; }