Issue 120073 - [From Symphony] There is a memory leak in function SvXMLImportItemMapper::PutXMLValue
Summary: [From Symphony] There is a memory leak in function SvXMLImportItemMapper::Put...
Alias: None
Product: performance
Classification: Code
Component: code (show other issues)
Version: AOO 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: AOO issues mailing list
QA Contact:
Depends on:
Blocks: 120975 121366
  Show dependency tree
Reported: 2012-06-25 03:01 UTC by ChaoHuang
Modified: 2013-02-16 09:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---

for file "main/sw/source/filter/xml/xmlimpit.cxx" (510 bytes, patch)
2012-06-25 03:05 UTC, ChaoHuang review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description ChaoHuang 2012-06-25 03:01:23 UTC
Code snippet
        case RES_FRAMEDIR:
            const XMLPropertyHandler* pWritingModeHandler =
            if( pWritingModeHandler != NULL )
                Any aAny;
                bOk = pWritingModeHandler->importXML( rValue, aAny,
                                                      rUnitConverter );
                if( bOk )
                    bOk = rItem.PutValue( aAny );

The object pWritingModeHandler is created in function XMLPropertyHandlerFactory::CreatePropertyHandler on heap. But it will not be released. So it is a memory leak.
Comment 1 ChaoHuang 2012-06-25 03:05:34 UTC
Created attachment 78452 [details]
for file "main/sw/source/filter/xml/xmlimpit.cxx"
Comment 2 ChaoHuang 2012-06-25 03:05:57 UTC
Need to free pWritingModeHandler explicitly.
Comment 3 2012-06-25 10:01:23 UTC
Thanks for the patch! Applied as 1353449.
Comment 4 Yan Ji 2012-11-30 04:47:33 UTC
Since last SVT(r1400866) shows there is no memory leak, so close this defect as resolved.