diff options
-rw-r--r-- | connectivity/source/commontools/TColumnsHelper.cxx | 5 | ||||
-rw-r--r-- | include/connectivity/TColumnsHelper.hxx | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx index 5d6fcf85e5b0..6cf821be8110 100644 --- a/connectivity/source/commontools/TColumnsHelper.cxx +++ b/connectivity/source/commontools/TColumnsHelper.cxx @@ -64,15 +64,12 @@ OColumnsHelper::OColumnsHelper( ::cppu::OWeakObject& _rParent ,const TStringVector &_rVector ,bool _bUseHardRef ) : OCollection(_rParent,_bCase,_rMutex,_rVector,false,_bUseHardRef) - ,m_pImpl(nullptr) ,m_pTable(nullptr) { } OColumnsHelper::~OColumnsHelper() { - delete m_pImpl; - m_pImpl = nullptr; } @@ -82,7 +79,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName) Reference<XConnection> xConnection = m_pTable->getConnection(); if ( !m_pImpl ) - m_pImpl = new OColumnsHelperImpl(isCaseSensitive()); + m_pImpl.reset(new OColumnsHelperImpl(isCaseSensitive())); bool bQueryInfo = true; bool bAutoIncrement = false; diff --git a/include/connectivity/TColumnsHelper.hxx b/include/connectivity/TColumnsHelper.hxx index 0c970aee722b..d4e52960ef12 100644 --- a/include/connectivity/TColumnsHelper.hxx +++ b/include/connectivity/TColumnsHelper.hxx @@ -33,7 +33,7 @@ namespace connectivity */ class OOO_DLLPUBLIC_DBTOOLS OColumnsHelper : public sdbcx::OCollection { - OColumnsHelperImpl* m_pImpl; + std::unique_ptr<OColumnsHelperImpl> m_pImpl; protected: OTableHelper* m_pTable; |