<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Multiple memory leaks in libmacabdrv1"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111634#c19">Comment # 19</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Multiple memory leaks in libmacabdrv1"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=111634">bug 111634</a>
from <span class="vcard"><a class="email" href="mailto:noelgrandin@gmail.com" title="Noel Grandin <noelgrandin@gmail.com>"> <span class="fn">Noel Grandin</span></a>
</span></b>
<pre>(In reply to Alex Thurgood from <a href="show_bug.cgi?id=111634#c18">comment #18</a>)
<span class="quote">> doesn't seem to show any difference, I still see 300K+ invocations of
>
> connectivity::macab::MacabRecord::copy(int) const</span >
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>