On Wednesday, 9 September 2020 02:17:52 PDT Giuseppe D'Angelo via Development 
wrote:
> > *- except when detach is necessary or shrinking happens
> 
> This is another against automatic shrinking; it may invalidate
> everything rather than just the erased area. I don't understand the
> "detach" part, is it about holding references across a detach, so they
> refer to the original container, not the detached one? That's not
> different from we always had, isn't it?

It means that if you try to erase from a container that is currently shared, 
it will detach. When it does, the detached container's size will be evaluated 
in terms of the size of the container, not the capacity the shared container 
had.

Obviously all iterators in a recently-detached container point to newly 
allocated memory, not to the original memory.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering



_______________________________________________
Development mailing list
[email protected]
https://lists.qt-project.org/listinfo/development

Reply via email to