[Libreoffice-bugs] [Bug 111634] Multiple memory leaks in libmacabdrv1
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Aug 18 14:31:48 UTC 2017
https://bugs.documentfoundation.org/show_bug.cgi?id=111634
--- Comment #19 from Noel Grandin <noelgrandin at gmail.com> ---
(In reply to Alex Thurgood from comment #18)
> doesn't seem to show any difference, I still see 300K+ invocations of
>
> connectivity::macab::MacabRecord::copy(int) const
Note that allocations by themselves are not a problem. The problem is when the
allocation is not matched by a free.
I see that MacabRecords::createHeaderForProperty is calling copy(), and then
attempting to release the records at the bottom, but without calling
CFRelease(_copy->value);
That may be a problem.
I actually think that the macabfield struct should have a destructor, and that
destructor should call CFRelease, instead of replicating the logic all over the
place.
Also MacabRecords::createHeaderForProperty should probably be using
std::vector<std::unique_ptr<macabfield >>
instead of manually managing stuff.
Also MacabHeader contains a field called "fields" that should really be a
std::vector<std::unique_ptr<macabfield>>
and MacabHeader does not seem to be releasing anything when it destructs, which
is probably a bug.
In general, this whole chunk of code is pretty bad.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170818/33b1a8c8/attachment.html>
More information about the Libreoffice-bugs
mailing list