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:
parent
0b2bd6be6c
commit
c501eb8bec
@ -92,7 +92,7 @@ public:
|
||||
initializeSession(true),
|
||||
#endif
|
||||
cookieJarCreated(false),
|
||||
authenticationManager(new QNetworkAccessAuthenticationManager)
|
||||
authenticationManager(QSharedPointer<QNetworkAccessAuthenticationManager>::create())
|
||||
{ }
|
||||
~QNetworkAccessManagerPrivate();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user