Kaydet (Commit) ed0ffbba authored tarafından Caolán McNamara's avatar Caolán McNamara

over-engineered thread-safe static OUString

This is a ridiculous over-engineered thread-safe static string for
something which is called so few times, and costs 1k of long-term
memory as the OUString dtor needs to be put into a callback
queue to get called at module unload time.

Just return a new string every time, *rolls eyes*
üst c8587d05
......@@ -567,16 +567,7 @@ Sequence< OUString > SfxDialogLibraryContainer::getSupportedServiceNames_static(
OUString SfxDialogLibraryContainer::getImplementationName_static()
{
static OUString aImplName;
static sal_Bool bNeedsInit = sal_True;
MutexGuard aGuard( Mutex::getGlobalMutex() );
if( bNeedsInit )
{
aImplName = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.sfx2.DialogLibraryContainer"));
bNeedsInit = sal_False;
}
return aImplName;
return OUString("com.sun.star.comp.sfx2.DialogLibraryContainer");
}
Reference< XInterface > SAL_CALL SfxDialogLibraryContainer::Create( const Reference< XComponentContext >& ) throw( Exception )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment