summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-17 21:10:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-20 15:23:08 +0100
commit254c2fca2d8c439774dad9c0e8667eb92811ca7e (patch)
tree224fe19029ef91b9a97a379f0c14f2e746cf9797
parent415b8e8e577b388b0b76f73c32066f8efa39d896 (diff)
valgrind: remove leaks
-rw-r--r--sfx2/source/appl/appinit.cxx9
-rw-r--r--sfx2/source/appl/appquit.cxx5
2 files changed, 9 insertions, 5 deletions
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 103d981939..19e53c242e 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -257,17 +257,16 @@ bool SfxApplication::Initialize_Impl()
// not processed are given to SFX as Errorcode 1.
new SimpleErrorHandler;
#endif
- new SfxErrorHandler(RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1);
-
- new SfxErrorHandler(
+ pAppData_Impl->m_pToolsErrorHdl = new SfxErrorHandler(
+ RID_ERRHDL, ERRCODE_AREA_TOOLS, ERRCODE_AREA_LIB1);
+ pAppData_Impl->m_pSoErrorHdl = new SfxErrorHandler(
RID_SO_ERROR_HANDLER, ERRCODE_AREA_SO, ERRCODE_AREA_SO_END);
- new SfxErrorHandler(
+ pAppData_Impl->m_pSbxErrorHdl = new SfxErrorHandler(
RID_BASIC_START, ERRCODE_AREA_SBX, ERRCODE_AREA_SBX_END );
// diverse Pointer
SfxPickList::GetOrCreate( SvtHistoryOptions().GetSize( ePICKLIST ) );
-
DBG_ASSERT( !pAppData_Impl->pAppDispat, "AppDispatcher already exists" );
pAppData_Impl->pAppDispat = new SfxDispatcher((SfxDispatcher*)0);
pAppData_Impl->pSlotPool = new SfxSlotPool;
diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx
index 8a354d9c11..f08435bf40 100644
--- a/sfx2/source/appl/appquit.cxx
+++ b/sfx2/source/appl/appquit.cxx
@@ -154,6 +154,11 @@ void SfxApplication::Deinitialize()
//TODO/CLEANTUP
//ReleaseArgs could be used instead!
pAppData_Impl->pPool = NULL;
+ NoChaos::ReleaseItemPool();
+
+ delete pAppData_Impl->m_pSbxErrorHdl;
+ delete pAppData_Impl->m_pSoErrorHdl;
+ delete pAppData_Impl->m_pToolsErrorHdl;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */