path: root/src/corelib/tools/qrefcount.h
diff options
authorJoão Abecasis <>2011-11-24 17:15:11 +0100
committerQt by Nokia <>2012-01-06 17:25:09 +0100
commit3d61c5ca8f00b489435d5bea776b4a4c97c39793 (patch)
tree45480cd94b6dbb0899398c0abb692bc1ebba3aca /src/corelib/tools/qrefcount.h
parent51048e1f31df5be45e71a75fc535111dd36c4c9e (diff)
Add setSharable support in QArrayData stack
Making use of the same feature added in RefCount. To keep with the intention of avoiding the allocation of "empty" array headers, this introduces an unsharable_empty, which allows users to maintain the "unsharable bit" on empty containers, without imposing any actual allocations. (Before anyone asks, there is no point to a zero-sized capacity-reserved container so no other combinations are needed for now.) Change-Id: Icaa40ac3100ad954fdc20dee0c991861136a5b19 Reviewed-by: Bradley T. Hughes <>
Diffstat (limited to 'src/corelib/tools/qrefcount.h')
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/tools/qrefcount.h b/src/corelib/tools/qrefcount.h
index 9478ff1269..bf864f2f58 100644
--- a/src/corelib/tools/qrefcount.h
+++ b/src/corelib/tools/qrefcount.h
@@ -111,6 +111,7 @@ public:
{ return atomic.load(); }
void initializeOwned() {; }
+ void initializeUnsharable() {; }
QBasicAtomicInt atomic;