[Development] Question about QCoreApplicationData::*_libpaths

Giuseppe D'Angelo dangelog at gmail.com
Mon Jan 18 19:35:35 CET 2016


On Mon, Jan 18, 2016 at 6:47 PM, Matthew Woehlke <mwoehlke.floss at gmail.com>
wrote:
>
> Now, imagine a std::vector<std::string> where both
> the vector and strings are very large. When the vector needs to resize,
> it will have to do a deep copy of ever single item, allocating and
> freeing lots of memory in the process.

Nitpicking: not really, because std::string::string(string &&) is noexcept,
so it can be already optimized in a mass-move construction plus a
mass-dtor. Sure, still way more expensive than it could be.

-- 
Giuseppe D'Angelo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160118/eddec51d/attachment.html>


More information about the Development mailing list