diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-06 16:49:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-06 16:49:44 +0200 |
commit | 37183595bb3b4d58682f90fd9f6713bedcb852a2 (patch) | |
tree | 1ac1fd9d69c0d09ea204173bd77721dc01bbddeb /lotuswordpro/source/filter/lwpholder.hxx | |
parent | 7abe976be5166845c5f43b70a0dfb38608d31356 (diff) |
Fix memory leaks, by refcounting LwpObject
Change-Id: I1539597cd5bcabcbf0295d1acc320c503ad53604
Diffstat (limited to 'lotuswordpro/source/filter/lwpholder.hxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpholder.hxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lotuswordpro/source/filter/lwpholder.hxx b/lotuswordpro/source/filter/lwpholder.hxx index 8e0f94bd8599..6f52ffc4c203 100644 --- a/lotuswordpro/source/filter/lwpholder.hxx +++ b/lotuswordpro/source/filter/lwpholder.hxx @@ -75,10 +75,11 @@ class LwpDLVListHeadHolder : public LwpObject { public: LwpDLVListHeadHolder(LwpObjectHeader& objHdr, LwpSvStream* pStrm); - virtual ~LwpDLVListHeadHolder(){} void Read() SAL_OVERRIDE; LwpObjectID* GetHeadID() { return &m_DLVHead;} private: + virtual ~LwpDLVListHeadHolder(){} + LwpObjectID m_DLVHead; }; /** @@ -89,12 +90,13 @@ class LwpDLVListHeadTailHolder : public LwpObject { public: LwpDLVListHeadTailHolder(LwpObjectHeader& objHdr, LwpSvStream* pStrm); - virtual ~LwpDLVListHeadTailHolder(){} void Read() SAL_OVERRIDE; LwpObjectID* GetHead(){ return m_HeadTail.GetHead();} LwpObjectID* GetTail(){ return m_HeadTail.GetTail();} protected: LwpDLVListHeadTail m_HeadTail; +private: + virtual ~LwpDLVListHeadTailHolder(){} }; /** * @brief LwpObjectHolder, which is LwpDLVList, contains an id to an object @@ -104,10 +106,11 @@ class LwpObjectHolder : public LwpDLVList { public: LwpObjectHolder(LwpObjectHeader& objHdr, LwpSvStream* pStrm); - virtual ~LwpObjectHolder(){} void Read() SAL_OVERRIDE; LwpObjectID* GetObject(){return &m_Object;} protected: + virtual ~LwpObjectHolder(){} + LwpObjectID m_Object; }; @@ -119,12 +122,13 @@ class LwpListList : public LwpObjectHolder { public: LwpListList(LwpObjectHeader& objHdr, LwpSvStream* pStrm); - virtual ~LwpListList(){} void Read() SAL_OVERRIDE; LwpObjectID* GetHead(){ return m_HeadTail.GetHead();} LwpObjectID* GetTail(){ return m_HeadTail.GetTail();} protected: LwpDLVListHeadTail m_HeadTail; +private: + virtual ~LwpListList(){} }; #endif |