You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by al...@apache.org on 2012/06/26 16:30:34 UTC
svn commit: r1354032 - in /incubator/ooo/trunk/main/sw/source/filter/ww8:
wrtww8.cxx wrtww8.hxx
Author: alg
Date: Tue Jun 26 14:30:33 2012
New Revision: 1354032
URL: http://svn.apache.org/viewvc?rev=1354032&view=rev
Log:
#1200098# Memoryleak fixed at PPt sw export by remembering and destroying the used stream.
Found by: Chao Huang
Patch by: Chao Huang
Review by: alg
Modified:
incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx
incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx
Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx?rev=1354032&r1=1354031&r2=1354032&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.cxx Tue Jun 26 14:30:33 2012
@@ -2731,9 +2731,10 @@ void WW8Export::WriteFkpPlcUsw()
#10570# Similiarly having msvbasic storage seems to also trigger
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);
- }
+ }
// dggInfo - escher stream
WriteEscher();
Modified: incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx?rev=1354032&r1=1354031&r2=1354032&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx (original)
+++ incubator/ooo/trunk/main/sw/source/filter/ww8/wrtww8.hxx Tue Jun 26 14:30:33 2012
@@ -926,6 +926,9 @@ protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer
WW8AttributeOutput *m_pAttrOutput; ///< Converting attributes to stream data
+private:
+ SvStorageRef xEscherStg; /// memory leak #i120098#, to hold the reference to unnamed SotStorage obj
+
public:
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const;