View Single Post
Posts: 17 | Thanked: 42 times | Joined on Feb 2010
#2
The difference in your code is that in one, you create the QNetworkManager on the stack

QNetworkManager m;

and in the other you create it on the heap

m = new QNetworkManager();

When you create on the stack, at the end of the current closure, the memory will be freed, and the ~QNetworkManager() method called.
 

The Following 4 Users Say Thank You to StewartHolmes For This Useful Post: