diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-05-07 23:03:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-05-20 15:22:48 +0100 |
commit | a5506c3c39949e0a31de0283739dadb6b3761c34 (patch) | |
tree | 0566279e70583a21cf7ff7b1604f77549f32962e /sd | |
parent | 1b96cbf851597244d47071e32c2c493fc5511ba3 (diff) |
valgrind: remove leak
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/sduiexp.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx index 3380fcb555c7..eec086630521 100644 --- a/sd/source/ui/dlg/sduiexp.cxx +++ b/sd/source/ui/dlg/sduiexp.cxx @@ -36,22 +36,12 @@ #include "sddlgfact.hxx" #include "sal/types.h" -namespace sdui -{ - static SdAbstractDialogFactory_Impl* pFactory=NULL; - SdAbstractDialogFactory_Impl* GetFactory() - { - if ( !pFactory ) - pFactory = new SdAbstractDialogFactory_Impl; - return pFactory; - } -} - extern "C" { SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* CreateDialogFactory() { - return ::sdui::GetFactory(); + static SdAbstractDialogFactory_Impl aFactory; + return &aFactory; } } |