incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120028] There is a memory leak in function SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem
Date Wed, 20 Jun 2012 04:35:08 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120028

--- Comment #5 from ChaoHuang <chao.dev.h@gmail.com> ---
(In reply to comment #3)
> Indeed, SvxBoxItem::SetLine() clones the provided SvxBorderLine object and
> that leaks. Thanks for finding and solving it!
> Applied as revision 1351616.
> 
> As a next step one could investigate whether SvxBoxItem::SetLine() should be
> changed to use the provided SvxBorderLine directly instead of cloning it.
> This would save two heap operations per line.

We can also reuse the existing local object. The code should be like this

      for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
            rBox.SetLine(&aLine, nLine);

The local object aLine with specific info will be passed into function
"rBox.SetLine" to clone.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.

Mime
View raw message