QNetworkReplyHttpImpl: optimize QAtomicInt allocation
Use QSharedPointer<T>::create(), which co-locates the refcount with the payload in a single memory allocation, instead of QSharedPointer<T>(new T), which causes two allocations. Change-Id: I3f70d15a6d1bfaaa8b48a36ed3c877e817a5b701 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
6a0d304a2d
commit
901515a008
@ -440,8 +440,8 @@ QNetworkReplyHttpImplPrivate::QNetworkReplyHttpImplPrivate()
|
||||
, downloadBufferReadPosition(0)
|
||||
, downloadBufferCurrentSize(0)
|
||||
, downloadZerocopyBuffer(0)
|
||||
, pendingDownloadDataEmissions(new QAtomicInt())
|
||||
, pendingDownloadProgressEmissions(new QAtomicInt())
|
||||
, pendingDownloadDataEmissions(QSharedPointer<QAtomicInt>::create())
|
||||
, pendingDownloadProgressEmissions(QSharedPointer<QAtomicInt>::create())
|
||||
#ifndef QT_NO_SSL
|
||||
, pendingIgnoreAllSslErrors(false)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user