summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-18 11:19:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-19 17:37:07 +0100
commitf5784794f4cecd4fd57a803191b544f80f7ba02e (patch)
treefd49d6d5078317d18ad1fd7933201c8318265bcf /framework/source
parent22e4f7a348f82fae7eefae5b67de3d829dceadcb (diff)
use single-use attribute for UIElementFactoryManager
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I52193861c4b2e07c3655773c8d185b2036336da2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112682 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uifactory/uielementfactorymanager.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/framework/source/uifactory/uielementfactorymanager.cxx b/framework/source/uifactory/uielementfactorymanager.cxx
index 02d5435bab80..b1567724ff06 100644
--- a/framework/source/uifactory/uielementfactorymanager.cxx
+++ b/framework/source/uifactory/uielementfactorymanager.cxx
@@ -542,22 +542,6 @@ void SAL_CALL UIElementFactoryManager::deregisterFactory( const OUString& aType,
// SAFE
}
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new UIElementFactoryManager(context)))
- {
- }
-
- css::uno::Reference<css::uno::XInterface> instance;
-};
-
-struct Singleton:
- public rtl::StaticWithArg<
- Instance, css::uno::Reference<css::uno::XComponentContext>, Singleton>
-{};
-
}
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
@@ -565,8 +549,7 @@ com_sun_star_comp_framework_UIElementFactoryManager_get_implementation(
css::uno::XComponentContext *context,
css::uno::Sequence<css::uno::Any> const &)
{
- return cppu::acquire(static_cast<cppu::OWeakObject *>(
- Singleton::get(context).instance.get()));
+ return cppu::acquire(new UIElementFactoryManager(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */