Hi, This patch add a virtual destructor to all classes from WW8ResourceModel.hxx with virtual methods to prevent memory leaks likes rtf few days ago almost from docx import filter.
Thanks Best regards -- Arnaud Versini
From c2054880238124c6cdc9b1fe7d14e9b10721decb Mon Sep 17 00:00:00 2001 From: Arnaud Versini <[email protected]> Date: Tue, 13 Mar 2012 20:41:38 +0100 Subject: [PATCH] Adding virtual destructor to WW8ResourceModel.hxx classes --- .../inc/resourcemodel/WW8ResourceModel.hxx | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx index 9504b6f..5869f04 100644 --- a/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx +++ b/writerfilter/inc/resourcemodel/WW8ResourceModel.hxx @@ -128,6 +128,9 @@ class Sprm; class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Properties { public: + + virtual ~Properties() {} + /** Receives an attribute. @@ -152,6 +155,8 @@ class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Table { public: typedef boost::shared_ptr<Table> Pointer_t; + + virtual ~Table() {} /** Receives an entry of the table. @@ -167,6 +172,8 @@ public: class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC BinaryObj { public: + + virtual ~BinaryObj() {} /** Receives binary data of the object. @@ -184,11 +191,14 @@ public: class WRITERFILTER_RESOURCEMODEL_DLLPUBLIC Stream { public: + /** Pointer to this stream. */ typedef boost::shared_ptr<Stream> Pointer_t; + virtual ~Stream() {} + /** Receives start mark for group with the same section properties. */ @@ -344,6 +354,9 @@ public: typedef auto_ptr<Sprm> Pointer_t; SAL_WNODEPRECATED_DECLARATIONS_POP enum Kind { UNKNOWN, CHARACTER, PARAGRAPH, TABLE }; + + virtual ~Sprm() {} + /** Returns id of the SPRM. */ -- 1.7.5.4
_______________________________________________ LibreOffice mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice
