Correct way to delete QNetworkRequest?
Solved
General and Desktop
-
No it does not.
-
Hi,
Don't create your request on the heap, there's no need for that.
-
@SGaist Basically I've created a custom struct to track each REST request. The custom struct (not QObject) contains associated QNetworkRequest and QNetworkReply pointers.
The issue is that I also delete REST request struct in QNetworkAccessManager::finished signal, so even if I create QNetworkRequest on stack inside my custom struct, my custom struct is created on heap and deleted inside the finished signal, so wouldn't that result in same error?
-
Why do you need to keep the request object ?
-
No it does not.