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. _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice