summaryrefslogtreecommitdiff
path: root/sfx2/source/bastyp/fltfnc.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-04-06 13:43:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-04-06 14:09:04 +0100
commit900bc2c56ae5ba21edafccccfd68619e1006b79b (patch)
tree047a602c326335779c8a7394e0710274184bb953 /sfx2/source/bastyp/fltfnc.cxx
parent9f877a81350edd875a09c0d68a99096e72ef5fef (diff)
fix ownership cycle and leak
Diffstat (limited to 'sfx2/source/bastyp/fltfnc.cxx')
-rw-r--r--sfx2/source/bastyp/fltfnc.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/sfx2/source/bastyp/fltfnc.cxx b/sfx2/source/bastyp/fltfnc.cxx
index 533320e64acd..36b812d24f76 100644
--- a/sfx2/source/bastyp/fltfnc.cxx
+++ b/sfx2/source/bastyp/fltfnc.cxx
@@ -92,6 +92,7 @@
#include <tools/urlobj.hxx>
#include <rtl/logfile.hxx>
+#include <rtl/instance.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::ucb;
@@ -122,13 +123,18 @@ using namespace ::com::sun::star::beans;
#include <sfx2/appuno.hxx>
#include <sfx2/viewfrm.hxx>
+namespace
+{
+ class theSfxFilterListener : public rtl::Static<SfxFilterListener, theSfxFilterListener> {};
+}
+
static SfxFilterList_Impl* pFilterArr = 0;
static sal_Bool bFirstRead = sal_True;
static void CreateFilterArr()
{
pFilterArr = new SfxFilterList_Impl;
- new SfxFilterListener();
+ theSfxFilterListener::get();
}
//----------------------------------------------------------------