diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-29 20:27:08 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-05-29 20:35:05 -0400 |
commit | 699e97ebc4169546c63a48736d953349df69fdf3 (patch) | |
tree | 3d3c7fa1de3c97f44aae6f1bc077939021f43c7b /desktop | |
parent | 105b36ce11448cefc6ee9a3a88ae35df274b30d7 (diff) |
Don't forget to dispose the component here.
Otherwise, none of the associated SfxViewFrame, SfxBaseController,
SfxObjectShell, SfxMedium etc would get destroyed which would ultimately
lead to the .~lock.foo file not being deleted upon exit.
But for this to work, the client code has to make sure that its
LibreOfficeDocument instance gets destroyed when it finishes its thing.
Change-Id: Id45eda526c1496712e4314a947e994eba5c3fa68
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 3b045590e0f1..0fcbc5f464b9 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -161,6 +161,11 @@ struct LibLODocument_Impl : public _LibreOfficeDocument saveAs = doc_saveAs; saveAsWithOptions = doc_saveAsWithOptions; } + + ~LibLODocument_Impl() + { + mxComponent->dispose(); + } }; static void doc_destroy(LibreOfficeDocument *pThis) |