[Interest] QueuedConnection, QByteArray, reserve, capacity

Yuri Alexandrov evilruff at gmail.com
Sat Jun 3 11:09:37 CEST 2017


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 at 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 at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20170603/e8029d91/attachment.html>


More information about the Interest mailing list