diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2014-08-06 15:33:46 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-12 03:12:11 -0500 |
commit | aac6ed7a67e70c2548d81484b2930f2a0ce1e4aa (patch) | |
tree | d413a242745823ce678c95ce7d402fa4370846a5 /dbaccess | |
parent | b6b84b972fc9b997a586ca2e5496eb0617544a1a (diff) |
Don't leak the previous cache
Conflicts:
dbaccess/source/core/api/RowSet.cxx
Change-Id: I61cb1c608a7de8efc63533085e86c6c17c05f545
Reviewed-on: https://gerrit.libreoffice.org/10795
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index ca83936456c3..d4795ee93340 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1701,6 +1701,10 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw() aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::eInDataManipulation ); SAL_INFO("dbaccess", "ORowSet::execute_NoApprove_NoNewConn: creating cache" ); + if(m_pCache) + { + DELETEZ(m_pCache); + } m_pCache = new ORowSetCache( xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName, m_bModified, m_bNew,m_aParameterValueForCache,m_aFilter,m_nMaxRows ); if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY ) { |