company logo

String :: reserve - Reserve memory for iSize character units.

The function attempts to allocate memory for at least iSize character units. If you know in advance how large the string will be, you can call this function, and if you re-size the string often you are likely to get better performance. When iSize is an underestimate, the worst that will happen is that the odaba::String will be a bit slower.

The sole purpose of this function is to provide a means of fine tuning odaba::String's memory usage. In general, you will rarely ever need to call this function.

This function is useful for code that needs to build up a long string and wants to avoid repeated reallocation.

Implementation details

String  :: reserve ( int32 iSize )
  • iSize - Size

    Size of the instance or property area. For string objects, the size is usually measured in units.