diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-12-01 11:24:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-12-03 10:53:00 +0100 |
commit | a925cd6f6704bcbdd1a7dd165d29d499a5c59797 (patch) | |
tree | 6245968ddb3b1a49abb6c1def842127b95292da9 /dbaccess | |
parent | 95c28023f21e74c5a81fe3511b3d5be5c1f9106d (diff) |
Don't prevent ODatabaseDocument refcount from dropping to zero
...preventing the dtor from ever being called. (DocumentEvents forwards its
acquire/release calls to its m_pData->rParent, i.e., the ODatabaseDocument, for
better or worse.) This caused ODatabaseDocument instances to be leaked during
e.g. JunitTest_dbaccess_complex. Regression introduced with
de2ac128da025502c533f8cede5862e054dd9c44 "loplugin:useuniqueptr in dbaccess".
Change-Id: Ida073c7e576b88e0d1d1a90253445e946e6eac99
Reviewed-on: https://gerrit.libreoffice.org/45652
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 5066377bbeab1000f31e3fa689bad2ff8bf35295)
Reviewed-on: https://gerrit.libreoffice.org/45685
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.hxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx index 8f9c8693433b..9479511367ce 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.hxx +++ b/dbaccess/source/core/dataaccess/databasedocument.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <map> +#include <memory> #include <ModelImpl.hxx> #include "documenteventnotifier.hxx" @@ -171,7 +172,7 @@ class ODatabaseDocument :public ModelDependentComponent // ModelDepe ::comphelper::OInterfaceContainerHelper2 m_aCloseListener; ::comphelper::OInterfaceContainerHelper2 m_aStorageListeners; - rtl::Reference<DocumentEvents> m_pEventContainer; + std::unique_ptr<DocumentEvents> m_pEventContainer; ::rtl::Reference< DocumentEventExecutor > m_pEventExecutor; DocumentEventNotifier m_aEventNotifier; |