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



On 2012-09-28 16:46, Norbert Thiebaud wrote:
On Fri, Sep 28, 2012 at 9:05 AM, Noel Grandin <noel@peralex.com> wrote:
If you tell me that the saving from not having the nCapacity field is the
motivation, then I get understand, but then we should update the docs to
reflect that fact, rather than pretending that OUString is immutable.
>From what I gathered: the thing pointed to by OUString _is_ immutable
but you can make a OUString point to another 'immutable content'.
iow it is not OUString that is immutable... but it's 'payload'.

I may be wrong, but I assume that the reason OUString is like that is
not just to save a nCapacity... but also because there are assumption
you can make if that property is true (that OUString only point to
immutable data, regarding memory allocation, copy, clone etc...



If that's the case, then we could steal a bit somewhere to indicate that the payload is immutable, and have all of those optimisations without needing to create a whole separate OUStringBuffer class.



Disclaimer: http://www.peralex.com/disclaimer.html



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.