[SOLVED] Re: About tdf#111432 leaks memory with CFString and other MacOs stuff

2017-08-08 Thread julien2412
Thank you Stephan for your feedback, I had missed this point.

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-tdf-111432-leaks-memory-with-CFString-and-other-MacOs-stuff-tp4220037p4220057.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: About tdf#111432 leaks memory with CFString and other MacOs stuff

2017-08-08 Thread Stephan Bergmann

On 08/07/2017 10:44 PM, julien2412 wrote:

But in this same method, I wonder if it'd be ok to make "sref" (see
https://opengrok.libreoffice.org/xref/core/sal/osl/unx/osxlocale.cxx#77)
static in order to avoid calling n times "getProcessLocale" method (defined
some lines above).


macosx_getLocale is only called through imp_getProcessLocale 
(sal/osl/unx/nlsupport.cxx), which is only called once from 
osl_getProcessLocale (sal/osl/unx/process_impl.cxx, controlled by the 
static g_process_locale struct).  So n <= 1 anyway.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: About tdf#111432 leaks memory with CFString and other MacOs stuff

2017-08-07 Thread julien2412
Reading more, "CFArrayGuard arrGuard(subs);" line 85 (see
https://opengrok.libreoffice.org/xref/core/sal/osl/unx/osxlocale.cxx#85)
allows to release automatically the variable when leaving the scope.

So only the "static" question remains.

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-tdf-111432-leaks-memory-with-CFString-and-other-MacOs-stuff-tp4220037p4220038.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice


About tdf#111432 leaks memory with CFString and other MacOs stuff

2017-08-07 Thread julien2412
Hi,

Following tdf#111432 (AddTempDevFont(const OUString& rFontFileURL) leaks
memory on invocation
https://bugs.documentfoundation.org/show_bug.cgi?id=111432, I'm searching
some similar cases.
First one I noticed is "subs" in "macosx_getLocale" method (see
https://opengrok.libreoffice.org/xref/core/sal/osl/unx/osxlocale.cxx#82)
which should be CFReleased before returning.

But in this same method, I wonder if it'd be ok to make "sref" (see
https://opengrok.libreoffice.org/xref/core/sal/osl/unx/osxlocale.cxx#77)
static in order to avoid calling n times "getProcessLocale" method (defined
some lines above).

Any thoughts?

Julien



--
View this message in context: 
http://nabble.documentfoundation.org/About-tdf-111432-leaks-memory-with-CFString-and-other-MacOs-stuff-tp4220037.html
Sent from the Dev mailing list archive at Nabble.com.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice