diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-23 15:03:45 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-23 21:58:09 +0200 |
commit | ebe57117c470a87a6b4201537616bd1379257c02 (patch) | |
tree | 59d8b55ff2a7d45c6a8292bf076177fe4a85d71f /include/connectivity | |
parent | 262bfd71808b53f008b8ab3307d62ddc5e2b88a1 (diff) |
leaks of OCollection in dbase import
presumably since...
commit 5c7b954935369cbbd22a6f43be63ac7c0ddbbfdc
Date: Mon Jan 29 13:28:44 2018 +0200
loplugin:useuniqueptr in OTable
OCollection 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: Ic292663a61b4d7dbf7636be7ad4c00aed0b5a7fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122528
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include/connectivity')
-rw-r--r-- | include/connectivity/sdbcx/VTable.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/connectivity/sdbcx/VTable.hxx b/include/connectivity/sdbcx/VTable.hxx index 919626681064..4d9b48c92835 100644 --- a/include/connectivity/sdbcx/VTable.hxx +++ b/include/connectivity/sdbcx/VTable.hxx @@ -73,9 +73,10 @@ namespace connectivity::sdbcx OUString m_Description; OUString m_Type; - rtl::Reference<OCollection> m_xKeys; - rtl::Reference<OCollection> m_xColumns; - rtl::Reference<OCollection> m_xIndexes; + // no Reference! see OCollection::acquire + std::unique_ptr<OCollection> m_xKeys; + std::unique_ptr<OCollection> m_xColumns; + std::unique_ptr<OCollection> m_xIndexes; OCollection* m_pTables; // must hold his own container to notify him when renaming using OTableDescriptor_BASE::rBHelper; |