incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 120028] There is a memory leak in function SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem
Date Wed, 20 Jun 2012 04:35:08 GMT

--- Comment #5 from ChaoHuang <> ---
(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.

View raw message