X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=inc%2FFBaseString.h;h=185a3e3391b1bb3bd62630f11cc171e074de5105;hb=f448dedea56555eaba6c866e7e55ed7b6e31e96d;hp=10178ba963755da56c42b320a97e3191993deaff;hpb=bcf8611628bb06fd14f2fe8e019ab52334953ae4;p=platform%2Fframework%2Fnative%2Fappfw.git diff --git a/inc/FBaseString.h b/inc/FBaseString.h index 10178ba..185a3e3 100644 --- a/inc/FBaseString.h +++ b/inc/FBaseString.h @@ -1,5 +1,4 @@ // -// Open Service Platform // Copyright (c) 2012 Samsung Electronics Co., Ltd. // // Licensed under the Apache License, Version 2.0 (the License); @@ -92,7 +91,7 @@ public: * * @param[in] ch A Unicode character */ - String(const wchar_t ch); + String(wchar_t ch); /** * Initializes this instance of %String with the specified Unicode string. @@ -1082,11 +1081,12 @@ private: 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 @@ -1098,10 +1098,11 @@ private: int __capacity; int __length; mutable int __hash; - mutable int* __pRefCount; + mutable volatile int* __pRefCount; mutable wchar_t* __pValue; static const float GROWTH_FACTOR; + static const int UNSHAREABLE; class _StringImpl * __pStringImpl; friend class _StringImpl;