Kaydet (Commit) 9914b317 authored tarafından Armin Le Grand's avatar Armin Le Grand

#120098# Memoryleak fixed at PPt sw export by remembering and destroying the used stream.

Found by: Chao Huang
Patch by: Chao Huang
Review by: alg
üst aee8221b
...@@ -2731,7 +2731,8 @@ void WW8Export::WriteFkpPlcUsw() ...@@ -2731,7 +2731,8 @@ void WW8Export::WriteFkpPlcUsw()
#10570# Similiarly having msvbasic storage seems to also trigger #10570# Similiarly having msvbasic storage seems to also trigger
creating this stream creating this stream
*/ */
GetWriter().GetStorage().OpenSotStorage(CREATE_CONST_ASC(SL::aObjectPool), // memory leak #i120098#, the unnamed obj will be released in destructor.
xEscherStg = GetWriter().GetStorage().OpenSotStorage(CREATE_CONST_ASC(SL::aObjectPool),
STREAM_READWRITE | STREAM_SHARE_DENYALL); STREAM_READWRITE | STREAM_SHARE_DENYALL);
} }
......
...@@ -926,6 +926,9 @@ protected: ...@@ -926,6 +926,9 @@ protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer SwWW8Writer *m_pWriter; ///< Pointer to the writer
WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data
private:
SvStorageRef xEscherStg; /// memory leak #i120098#, to hold the reference to unnamed SotStorage obj
public: public:
/// Access to the attribute output class. /// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const; virtual AttributeOutputBase& AttrOutput() const;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment