[Libreoffice-commits] core.git: desktop/source

Kohei Yoshida kohei.yoshida at collabora.com
Thu May 29 17:34:36 PDT 2014


 desktop/source/lib/init.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 699e97ebc4169546c63a48736d953349df69fdf3
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date:   Thu May 29 20:27:08 2014 -0400

    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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3b04559..0fcbc5f 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)


More information about the Libreoffice-commits mailing list