result InitializeToDefault(int capacity);
//
- // Copies __pValue and subtract and initialize __pRefCount
+ // When the reference count is bigger than 1 and it is not UNSHAREABLE, copies__pValue and subtracts and initializes __pRefCount.
+ // If the isUnshareable is true, this method sets the reference count to UNSHAREABLE.
//
- // @since 2.0
+ // @since 2.2
//
- result CopyOnWrite(int capacity);
+ result AboutToModify(int capacity, bool isUnshareable = false);
//
// Swaps member-wisely
mutable wchar_t* __pValue;
static const float GROWTH_FACTOR;
+ static const int UNSHAREABLE;
class _StringImpl * __pStringImpl;
friend class _StringImpl;