[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - dbaccess/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 24 09:34:26 UTC 2021
dbaccess/source/core/api/RowSet.cxx | 4 ++--
dbaccess/source/core/api/RowSet.hxx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit fd5b497cf2a9d0a276c83b702e1499513bb9fab9
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Sep 23 08:53:17 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Fri Sep 24 11:33:50 2021 +0200
memory leak on loading dbase files
see on loading qadevOOo/testdocs/BasicDB/DBTest.dbf
a problem apparently since...
commit a245e5c60fac58889738a9705225c6378b35eef4
Date: Tue May 8 12:42:55 2018 +0200
loplugin:useuniqueptr in ORowSet
OTableContainer inherits from OCollection which has a unique and
nonstandard acquire/release which forwards to a parent
cppu::OWeakObject. So when it would appear to a casual observer, who
assumes that it has an internal refcount, that its refcount would drop
to zero and then get auto-deleted, nothing of the kind occurs.
Change-Id: Ib104415ccc13c6ed9c06f975857fcd4413e2e05d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122519
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 85ef14318897f6e32c4987ab9d76c38a9752da24)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122440
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index f7deaa0c1d5e..3eee1c296060 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -2231,7 +2231,7 @@ Reference< XNameAccess > ORowSet::impl_getTables_throw()
DBG_UNHANDLED_EXCEPTION("dbaccess");
}
- m_xTables = new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend);
+ m_xTables.reset(new OTableContainer(*this,m_aMutex,m_xActiveConnection,bCase,nullptr,nullptr,m_nInAppend));
xTables = m_xTables.get();
Sequence<OUString> aTableFilter { "%" };
m_xTables->construct(aTableFilter,Sequence< OUString>());
@@ -2254,7 +2254,7 @@ void ORowSet::impl_resetTables_nothrow()
DBG_UNHANDLED_EXCEPTION("dbaccess");
}
- m_xTables.clear();
+ m_xTables.reset();
}
void ORowSet::impl_initComposer_throw( OUString& _out_rCommandToExecute )
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index a7d06a7a6567..33a1aceaa4c5 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -100,7 +100,7 @@ namespace dbaccess
::dbtools::WarningsContainer m_aWarnings;
- rtl::Reference<OTableContainer> m_xTables;
+ std::unique_ptr<OTableContainer> m_xTables;
OUString m_aCommand;
OUString m_aDataSourceName;
More information about the Libreoffice-commits
mailing list