summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-06-08 08:55:36 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-08 10:56:27 +0000
commitaed4c42491b294cb57efc950a4d0209116be6452 (patch)
tree0ffca220435f7a1739cfca77189409aeb00260a2 /framework
parentc80d34ad551efe858c47445b13370aa8223357c7 (diff)
remove some manual ref-counting in framework
Change-Id: I469439abfa4e9dcd29f2d1693b03d37b3d61c81e Reviewed-on: https://gerrit.libreoffice.org/26047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uifactory/uicontrollerfactory.cxx15
1 files changed, 5 insertions, 10 deletions
diff --git a/framework/source/uifactory/uicontrollerfactory.cxx b/framework/source/uifactory/uicontrollerfactory.cxx
index e62c171d8148..7d4809bcdcf6 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/frame/XUIControllerFactory.hpp>
#include <rtl/ustrbuf.hxx>
+#include <rtl/ref.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -60,9 +61,9 @@ public:
protected:
UIControllerFactory( const css::uno::Reference< css::uno::XComponentContext >& xContext, const rtl::OUString &rUINode );
- bool m_bConfigRead;
- css::uno::Reference< css::uno::XComponentContext > m_xContext;
- ConfigurationAccess_ControllerFactory* m_pConfigAccess;
+ bool m_bConfigRead;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ rtl::Reference<ConfigurationAccess_ControllerFactory> m_pConfigAccess;
private:
virtual void SAL_CALL disposing() override;
@@ -78,7 +79,6 @@ UIControllerFactory::UIControllerFactory(
{
m_pConfigAccess = new ConfigurationAccess_ControllerFactory(m_xContext,
"/org.openoffice.Office.UI.Controller/Registered/" + rConfigurationNode);
- m_pConfigAccess->acquire();
}
UIControllerFactory::~UIControllerFactory()
@@ -89,12 +89,7 @@ UIControllerFactory::~UIControllerFactory()
void SAL_CALL UIControllerFactory::disposing()
{
osl::MutexGuard g(rBHelper.rMutex);
- if (m_pConfigAccess)
- {
- // reduce reference count
- m_pConfigAccess->release();
- m_pConfigAccess = nullptr;
- }
+ m_pConfigAccess.clear();
}
// XMultiComponentFactory