Actually I just checked 5.9 QByteArray sources and I must say that optimization on releasing memory than shrinking more then half is disabled for capacity reserved arrays. So, it’s already works as expected =)
Yuri From: Thiago Macieira Sent: Friday, June 2, 2017 7:07 PM To: interest@qt-project.org Subject: Re: [Interest] QueuedConnection, QByteArray, reserve, capacity On Friday, 2 June 2017 01:51:40 PDT Yuri Alexandrov wrote: > I was just proposing something like > setAllocationPolicy( some Enum/int ) > or > setAllocationFlags( int with some bit fields) > > which might control how an allocation is done. That's exactly what I had understood and I said that we'd need to store the allocation policy somewhere in QByteArray's internals. And I'm rejecting that as too much overhead for the 99% case use of QByteArray. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest