From 699e97ebc4169546c63a48736d953349df69fdf3 Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 29 May 2014 20:27:08 -0400 Subject: 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 --- desktop/source/lib/init.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'desktop') 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) -- cgit