summaryrefslogtreecommitdiff
path: root/framework/source
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-18 11:17:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-19 17:36:29 +0100
commit22e4f7a348f82fae7eefae5b67de3d829dceadcb (patch)
tree9ed2cf706bb6ed41dc2f0f8449b10278e32148d3 /framework/source
parent48f6ce530f3546570eabdf398388185ab988636b (diff)
use single-use attribute for WindowContentFactoryManager
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: I877c541c11d5c667b0d94cb3875f4263a9323dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112681 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'framework/source')
-rw-r--r--framework/source/uifactory/windowcontentfactorymanager.cxx19
1 files changed, 1 insertions, 18 deletions
diff --git a/framework/source/uifactory/windowcontentfactorymanager.cxx b/framework/source/uifactory/windowcontentfactorymanager.cxx
index 996fae5f41a1..0d2991c80b7e 100644
--- a/framework/source/uifactory/windowcontentfactorymanager.cxx
+++ b/framework/source/uifactory/windowcontentfactorymanager.cxx
@@ -193,22 +193,6 @@ uno::Reference< uno::XInterface > SAL_CALL WindowContentFactoryManager::createIn
return xWindow;
}
-struct Instance {
- explicit Instance(
- css::uno::Reference<css::uno::XComponentContext> const & context):
- instance(static_cast<cppu::OWeakObject *>(
- new WindowContentFactoryManager(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 *
@@ -216,8 +200,7 @@ com_sun_star_comp_framework_WindowContentFactoryManager_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 WindowContentFactoryManager(context));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */