QVector也是隐式数据共享的

Behind the scenes, QString uses implicit sharing (copy-on-write) to reduce memory usage and to avoid the needless copying of data.
QVector也是隐式数据共享的;虽然文档没说但是看代码能知道

inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }

原文地址:https://www.cnblogs.com/likemao/p/10302351.html