
----- "DE" <satan66613@yandex.ru> a écrit :
on 07.03.2011 at 9:17 Jeffrey Lee Hellrung, Jr. wrote :
Another concern with COW in general is iterator invalidation. Either your iterator gets "fatter" and slower (e.g., by being implemented as a pointer to the object + offset), or you expand the class of operations that invalidate iterators beyond just resizing operations to *any* modification operation (compared to a class which does not use COW).
been the cow atomically ref counted you will NEVER notice it's there
I can't wait for the day "atomic free" will be a marketing point, just like "lock free" is today.
think of it: if an operation requires reallocation of the storage then anyway iterators are invalidated
Without COW, the iterators used in another thread are not invalidated, since no data is shared. Anyway, this whole thing sums up to: let me choose the container that suits my needs. Ivan