use single-use attribute for DataAccessDescriptorFactory
instead of rtl::Instance, which means it will get cleaned up when UNO shuts down Change-Id: Ibda8720952169c79c2456c0233b23223e85a3301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112933 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
6472f84447
commit
0748309838
2 changed files with 3 additions and 14 deletions
|
@ -236,18 +236,6 @@ namespace
|
|||
return new DataAccessDescriptor();
|
||||
}
|
||||
|
||||
struct Instance {
|
||||
explicit Instance():
|
||||
instance(new DataAccessDescriptorFactory())
|
||||
{}
|
||||
|
||||
rtl::Reference<cppu::OWeakObject> instance;
|
||||
};
|
||||
|
||||
struct Singleton:
|
||||
public rtl::Static<Instance, Singleton>
|
||||
{};
|
||||
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
|
||||
|
@ -255,7 +243,7 @@ com_sun_star_comp_dba_DataAccessDescriptorFactory(
|
|||
css::uno::XComponentContext *,
|
||||
css::uno::Sequence<css::uno::Any> const &)
|
||||
{
|
||||
return cppu::acquire(Singleton::get().instance.get());
|
||||
return cppu::acquire(new DataAccessDescriptorFactory());
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -24,7 +24,8 @@
|
|||
<service name="com.sun.star.chart2.data.DatabaseDataProvider"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.dba.DataAccessDescriptorFactory"
|
||||
constructor="com_sun_star_comp_dba_DataAccessDescriptorFactory">
|
||||
constructor="com_sun_star_comp_dba_DataAccessDescriptorFactory"
|
||||
single-instance="true">
|
||||
<singleton name="com.sun.star.sdb.DataAccessDescriptorFactory"/>
|
||||
</implementation>
|
||||
<implementation name="com.sun.star.comp.dba.OCommandDefinition"
|
||||
|
|
Loading…
Reference in a new issue