diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-05-29 13:18:37 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2019-05-31 18:07:08 +0200 |
commit | 7bd559972069055e0df726993a018f9b4d129221 (patch) | |
tree | 38fe461dbc0ba16017e599c5e46066f74f3a0c17 /include | |
parent | 616ed2365434da0008b3be93b86fd49e0052f1aa (diff) |
connectivity: fix memory leaks caused by OConnection::acquire()
Followup to 58f121ef2e680697e10453add43bab9b771d153a;
OConnection must not be held by rtl::Reference as that creates a cycle.
(regression from 497e40ad03c27837978551ba15491c3fb2a0bf53)
Change-Id: Ibd56d335e3e2631c5a57ea435f1035e89868a5a6
Reviewed-on: https://gerrit.libreoffice.org/73155
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 6bd751f9f577f25b058fb8a5479c0de7552c3ffc)
Reviewed-on: https://gerrit.libreoffice.org/73243
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/connectivity/sdbcx/VGroup.hxx | 3 | ||||
-rw-r--r-- | include/connectivity/sdbcx/VIndex.hxx | 3 | ||||
-rw-r--r-- | include/connectivity/sdbcx/VKey.hxx | 3 | ||||
-rw-r--r-- | include/connectivity/sdbcx/VUser.hxx | 3 |
4 files changed, 8 insertions, 4 deletions
diff --git a/include/connectivity/sdbcx/VGroup.hxx b/include/connectivity/sdbcx/VGroup.hxx index 61722d234e2f..dfff84dedb39 100644 --- a/include/connectivity/sdbcx/VGroup.hxx +++ b/include/connectivity/sdbcx/VGroup.hxx @@ -55,7 +55,8 @@ namespace connectivity public ODescriptor { protected: - rtl::Reference<OUsers> m_pUsers; + // no Reference! see OCollection::acquire + std::unique_ptr<OUsers> m_pUsers; using OGroup_BASE::rBHelper; diff --git a/include/connectivity/sdbcx/VIndex.hxx b/include/connectivity/sdbcx/VIndex.hxx index 6cd36f02861f..7ffc269cf4e7 100644 --- a/include/connectivity/sdbcx/VIndex.hxx +++ b/include/connectivity/sdbcx/VIndex.hxx @@ -57,7 +57,8 @@ namespace connectivity bool m_IsPrimaryKeyIndex; bool m_IsClustered; - rtl::Reference<OCollection> m_pColumns; + // no Reference! see OCollection::acquire + std::unique_ptr<OCollection> m_pColumns; using ODescriptor_BASE::rBHelper; virtual void refreshColumns() override; diff --git a/include/connectivity/sdbcx/VKey.hxx b/include/connectivity/sdbcx/VKey.hxx index bafab2761015..d786fb00c74a 100644 --- a/include/connectivity/sdbcx/VKey.hxx +++ b/include/connectivity/sdbcx/VKey.hxx @@ -69,7 +69,8 @@ namespace connectivity { protected: std::shared_ptr<KeyProperties> m_aProps; - rtl::Reference<OCollection> m_pColumns; + // no Reference! see OCollection::acquire + std::unique_ptr<OCollection> m_pColumns; using ODescriptor_BASE::rBHelper; // OPropertyArrayUsageHelper diff --git a/include/connectivity/sdbcx/VUser.hxx b/include/connectivity/sdbcx/VUser.hxx index 2727f167a029..c30875df873f 100644 --- a/include/connectivity/sdbcx/VUser.hxx +++ b/include/connectivity/sdbcx/VUser.hxx @@ -53,7 +53,8 @@ namespace connectivity public ODescriptor { protected: - rtl::Reference<OGroups> m_pGroups; + // no Reference! see OCollection::acquire + std::unique_ptr<OGroups> m_pGroups; using OUser_BASE::rBHelper; |