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

valgrind: memory leak

Change-Id: Ica30df49caf79117bbce36ec461ec5ef37bef20c
üst 48ea499a
......@@ -112,7 +112,25 @@ using namespace com::sun::star;
namespace
{
class theSfxFilterListener : public rtl::Static<SfxFilterListener, theSfxFilterListener> {};
class theSfxFilterArray : public rtl::Static<SfxFilterList_Impl, theSfxFilterArray > {};
class SfxFilterArray
{
SfxFilterList_Impl aList;
public:
~SfxFilterArray()
{
SfxFilterList_Impl::iterator aEnd = aList.end();
for (SfxFilterList_Impl::iterator aI = aList.begin(); aI != aEnd; ++aI)
{
SfxFilter *pFilter = *aI;
delete pFilter;
}
}
SfxFilterList_Impl *getList()
{
return &aList;
}
};
class theSfxFilterArray : public rtl::Static<SfxFilterArray, theSfxFilterArray > {};
}
static SfxFilterList_Impl* pFilterArr = 0;
......@@ -120,17 +138,15 @@ static bool bFirstRead = true;
static void CreateFilterArr()
{
pFilterArr = &theSfxFilterArray::get();
pFilterArr = theSfxFilterArray::get().getList();
theSfxFilterListener::get();
}
inline OUString ToUpper_Impl( const OUString &rStr )
{
return SvtSysLocale().GetCharClass().uppercase( rStr );
}
class SfxFilterContainer_Impl
{
public:
......
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