From cb27a8051c81b11f1d9da10d261980a3a06f6eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 19 Apr 2011 16:15:20 +0100 Subject: [PATCH] SfxHelp leaks, make sure it goes away at the right time --- sfx2/source/appl/app.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx index da17f4d5b1c8..20b37d269e01 100644 --- a/sfx2/source/appl/app.cxx +++ b/sfx2/source/appl/app.cxx @@ -153,6 +153,7 @@ using namespace ::com::sun::star; // Static member SfxApplication* SfxApplication::pApp = NULL; static BasicDLL* pBasic = NULL; +static SfxHelp* pSfxHelp = NULL; class SfxPropertyHandler : public PropertyHandler { @@ -305,7 +306,6 @@ SfxApplication* SfxApplication::GetOrCreate() ::framework::SetIsDockingWindowVisible( IsDockingWindowVisible ); ::framework::SetActivateToolPanel( &SfxViewFrame::ActivateToolPanel ); - SfxHelp* pSfxHelp = new SfxHelp; Application::SetHelp( pSfxHelp ); if ( SvtHelpOptions().IsHelpTips() ) Help::EnableQuickHelp(); @@ -351,6 +351,8 @@ SfxApplication::SfxApplication() #endif #endif + pSfxHelp = new SfxHelp; + pBasic = new BasicDLL; StarBASIC::SetGlobalErrorHdl( LINK( this, SfxApplication, GlobalBasicErrorHdl_Impl ) ); RTL_LOGFILE_CONTEXT_TRACE( aLog, "} initialize DDE" ); @@ -364,6 +366,9 @@ SfxApplication::~SfxApplication() SfxModule::DestroyModules_Impl(); + delete pSfxHelp; + Application::SetHelp( NULL ); + // delete global options SvtViewOptions::ReleaseOptions(); delete pBasic;