summaryrefslogtreecommitdiffstats
path: root/include/connectivity
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2019-05-29 13:18:37 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2019-05-31 10:19:21 +0200
commit6bd751f9f577f25b058fb8a5479c0de7552c3ffc (patch)
tree56599da4cd740d638cc17c1aeb7a134a96a2b47a /include/connectivity
parenttdf#66765 - FILESAVE: saving sheet with some queries in it takes forever (diff)
downloadcore-6bd751f9f577f25b058fb8a5479c0de7552c3ffc.tar.gz
core-6bd751f9f577f25b058fb8a5479c0de7552c3ffc.zip
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>
Diffstat (limited to 'include/connectivity')
-rw-r--r--include/connectivity/sdbcx/VGroup.hxx3
-rw-r--r--include/connectivity/sdbcx/VIndex.hxx3
-rw-r--r--include/connectivity/sdbcx/VKey.hxx3
-rw-r--r--include/connectivity/sdbcx/VUser.hxx3
4 files changed, 8 insertions, 4 deletions
diff --git a/include/connectivity/sdbcx/VGroup.hxx b/include/connectivity/sdbcx/VGroup.hxx
index ead9a500c6b9..f393c421e33b 100644
--- a/include/connectivity/sdbcx/VGroup.hxx
+++ b/include/connectivity/sdbcx/VGroup.hxx
@@ -51,7 +51,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 b4360f7e0805..ecfced63e18a 100644
--- a/include/connectivity/sdbcx/VIndex.hxx
+++ b/include/connectivity/sdbcx/VIndex.hxx
@@ -53,7 +53,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 6bc6b7df2ecb..f6a04edcf773 100644
--- a/include/connectivity/sdbcx/VKey.hxx
+++ b/include/connectivity/sdbcx/VKey.hxx
@@ -68,7 +68,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 ef488b074ac7..a407a063f0d7 100644
--- a/include/connectivity/sdbcx/VUser.hxx
+++ b/include/connectivity/sdbcx/VUser.hxx
@@ -51,7 +51,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;