Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On Wed, 2011-08-31 at 15:41 +0200, Stephan Bergmann wrote:
On Aug 31, 2011, at 12:04 PM, Caolán McNamara wrote:
...
I'm vaguely thinking of ... i18nutil x_rtl stuff ... hard-coding its
refcount argument to 0  or 1 and fixing up its uses to consistently
use one or the other public OUString acquire/noacquire ctors

done. Sadly half of the x_rtl uses were broken anyway, in the sense that
the rtl_uString was just used as a buffer, part of it *copied* into new
OUString and the original leaked. Changed the ok ones to use a
SAL_NOACQUIRE ctor and a x_rtl_uString_new_WithLength which creates a
rtl_uString with a ref-count of 1, and recovered a few of the
copy-and-leak cases which were easy conversions to what the original
intent was supposed to be, and converted the others to simple
sal_Unicode buffers

[1] with a loop, I suppose its no real optimization there to use memset
or rtl_allocateMemory for that case ?

Wouldn't hurt to use memset instead, I'd say.

done

C.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.