diff options
author | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-25 08:55:35 +0000 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-07-25 09:06:03 +0000 |
commit | 5dd1cd72f45df0ec13842d4ee9c849726cb74ea9 (patch) | |
tree | 6a9aedebe3b5b9f69b43b2448b9fb6736584c1d6 /starmath | |
parent | 75a66d2d1f295a1a9a488f0a12c672a975ffaf81 (diff) |
Revert "Fix memory leak in Math, by holding SmModel pointer"
Breaks unit tests of rtf import
This reverts commit ef66cc105e0051fa1414b72c5ee2bf1b2f9331cb
Change-Id: I95c13fc2bc3f9494a33153c62a7d52eb6f8efdd9
Reviewed-on: https://gerrit.libreoffice.org/5095
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/document.hxx | 2 | ||||
-rw-r--r-- | starmath/source/document.cxx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/starmath/inc/document.hxx b/starmath/inc/document.hxx index f86207dffb4f..4446ad0d86fd 100644 --- a/starmath/inc/document.hxx +++ b/starmath/inc/document.hxx @@ -39,7 +39,6 @@ #include "format.hxx" #include "parse.hxx" #include "smmod.hxx" -#include "unomodel.hxx" class SmNode; class SfxMenuBarManager; @@ -96,7 +95,6 @@ class SmDocShell : public SfxObjectShell, public SfxListener OUString aText; SmFormat aFormat; SmParser aInterpreter; - SmModel *pModel; OUString aAccText; SmNode *pTree; SfxMenuBarManager *pMenuMgr; diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index edc635ed4ac5..e49faecbc852 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -684,7 +684,6 @@ void SmDocShell::Repaint() SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) : SfxObjectShell( i_nSfxCreationFlags ), - pModel ( new SmModel(this) ), pTree ( 0 ), pEditEngineItemPool ( 0 ), pEditEngine ( 0 ), @@ -704,9 +703,11 @@ SmDocShell::SmDocShell( const sal_uInt64 i_nSfxCreationFlags ) : StartListening(aFormat); StartListening(*pp->GetConfig()); - SetBaseModel( pModel ); + SetBaseModel( new SmModel(this) ); } + + SmDocShell::~SmDocShell() { SAL_INFO( "starmath", "starmath: SmDocShell::~SmDocShell" ); @@ -716,6 +717,7 @@ SmDocShell::~SmDocShell() EndListening(aFormat); EndListening(*pp->GetConfig()); + if(pCursor) delete pCursor; pCursor = NULL; @@ -724,7 +726,6 @@ SmDocShell::~SmDocShell() SfxItemPool::Free(pEditEngineItemPool); delete pTree; delete pPrinter; - delete pModel; } |