Apache OpenOffice (AOO) Bugzilla – Issue 120072
[From Symphony] There is a memory leak in function SvXMLExportItemMapper::QueryXMLValue
Last modified: 2013-02-16 09:15:50 UTC
Code snippet ----------------------------------------------------------------- case RES_FRAMEDIR: { Any aAny; bOk = rItem.QueryValue( aAny ); if( bOk ) { const XMLPropertyHandler* pWritingModeHandler = XMLPropertyHandlerFactory::CreatePropertyHandler( XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT ); OUString sValue; bOk = pWritingModeHandler->exportXML( sValue, aAny, rUnitConverter ); if( bOk ) aOut.append( sValue ); } } break; The object pWritingModeHandler is created in function XMLPropertyHandlerFactory::CreatePropertyHandler on heap. But it will not be released. So it is a memory leak.
Created attachment 78451 [details] for file "main/sw/source/filter/xml/xmlexpit.cxx"
Need to free pWritingModeHandler explicitly
Comment on attachment 78451 [details] for file "main/sw/source/filter/xml/xmlexpit.cxx" I will review it
Comment on attachment 78451 [details] for file "main/sw/source/filter/xml/xmlexpit.cxx" The fix works very well.
Committed to 3.5 trunk by revision r1353406.
Suggest to put it into AOO 3.5.0 release
Since last SVT(r1400866) shows there is no memory leak, so close this defect as resolved.