From 170df072a612456ec83143dff0174a2e376afcba Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 22 Nov 2018 13:12:17 +0200 Subject: improve function-local statics in toolkit Change-Id: I2a134d1cc74eaeaad46f4249fadd215b2391ba19 Reviewed-on: https://gerrit.libreoffice.org/63789 Tested-by: Jenkins Reviewed-by: Noel Grandin --- toolkit/source/controls/controlmodelcontainerbase.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'toolkit/source/controls/controlmodelcontainerbase.cxx') diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 4d05caa81ff8..514cfccec5b9 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -233,13 +233,8 @@ Any ControlModelContainerBase::ImplGetDefaultValue( sal_uInt16 nPropId ) const ::cppu::IPropertyArrayHelper& ControlModelContainerBase::getInfoHelper() { - static UnoPropertyArrayHelper* pHelper = nullptr; - if ( !pHelper ) - { - Sequence aIDs = ImplGetPropertyIds(); - pHelper = new UnoPropertyArrayHelper( aIDs ); - } - return *pHelper; + static UnoPropertyArrayHelper aHelper( ImplGetPropertyIds() ); + return aHelper; } void SAL_CALL ControlModelContainerBase::dispose( ) -- cgit