Le mer. 9 sept. 2020 à 15:38, Andrei Golubev <andrei.golu...@qt.io> a écrit : > > I don't understand what this means. Am I supposed to reserve a > container to its current size before erasing elements > from it, if I don't want the erase to shrink it? > > Yes.
For what it's worth, as a user, I think this would violate the principle of least surprise. I would expect QCC in Qt6 to behave like std::vector, and like QCC in Qt5 : an erase never shrinks the allocated memory. If I want to reclaim memory, I must explicitly use shrink_to_fit/squeeze. _______________________________________________ Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development