* After my last change, _IsShareable() was called on the wrong string in the
copy constructors, effectively turning of references completely. * Since that caused troubles (NetPositive now crashes when started), I temporarily disabled references by letting _IsShareable() always return false until the issue is resolved. * _FreePrivateData() now sets the fPrivateData member to NULL, and is also safe to be called when fPrivateData is NULL. * Removed my comment about the threading problem in _Detach() and _DetachWith() as that just couldn't happen. * _Clone() must not use memcpy() as the string pointed to by "data" might not be as long as "length". * LockBuffer() now marks a string as unshareable. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24345 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -254,8 +254,9 @@ private:
|
||||
const char* with, int32 withLen);
|
||||
|
||||
private:
|
||||
inline int32& _ReferenceCount();
|
||||
bool _IsShareable();
|
||||
int32& _ReferenceCount();
|
||||
const int32& _ReferenceCount() const;
|
||||
bool _IsShareable() const;
|
||||
void _FreePrivateData();
|
||||
|
||||
char* fPrivateData;
|
||||
|
||||
Reference in New Issue
Block a user