unotools/source/config/eventcfg.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9c046328596e21ce26ed59e215ba2ba5202361e2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 23 11:04:38 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon May 23 15:26:12 2022 +0200

    cache ref to GlobalEventConfig
    
    so we avoid repeated allocation
    
    Change-Id: I9541c52e73878cf515c9159477bd3d2fda9e0078
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134803
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/unotools/source/config/eventcfg.cxx 
b/unotools/source/config/eventcfg.cxx
index 8cd883e0a0be..a92618a81f56 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -374,7 +374,7 @@ OUString GlobalEventConfig::GetEventName( GlobalEventId 
nIndex )
 {
     if (utl::ConfigManager::IsFuzzing())
         return OUString();
-    rtl::Reference<GlobalEventConfig> createImpl(new GlobalEventConfig);
+    static rtl::Reference<GlobalEventConfig> createImpl(new GlobalEventConfig);
     return GlobalEventConfig::m_pImpl->GetEventName( nIndex );
 }
 

Reply via email to