QNetworkAccessManager: optimize QNetworkAccessAuthenticationManager 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: I58196b6390dcc9bd52417e279fd9e000ab9ee9cc
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Marc Mutz 2014-03-11 23:17:56 +01:00 committed by The Qt Project
parent 0b2bd6be6c
commit c501eb8bec

View File

@ -92,7 +92,7 @@ public:
initializeSession(true),
#endif
cookieJarCreated(false),
authenticationManager(new QNetworkAccessAuthenticationManager)
authenticationManager(QSharedPointer<QNetworkAccessAuthenticationManager>::create())
{ }
~QNetworkAccessManagerPrivate();