https://bugs.documentfoundation.org/show_bug.cgi?id=111634

--- Comment #19 from Noel Grandin <[email protected]> ---
(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.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to