Cleanup self better fixes#148 (#154)

Co-authored-by: Chris Rizzitello <crizzitello@ics.com>
main
crizzitello 2022-05-02 12:49:19 -04:00 committed by GitHub
parent bd5bfac64f
commit bb41850639
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 5 deletions

View File

@ -43,12 +43,13 @@ class NetMan : public QObject {
private: private:
QNetworkAccessManager *nam; QNetworkAccessManager *nam;
NetMan() { nam = new QNetworkAccessManager; } NetMan(QObject * parent = nullptr)
~NetMan() { : QObject(parent)
delete nam; , nam(new QNetworkAccessManager(this))
stopReply(&allOpsReply); {
stopReply(&githubReleaseReply);
} }
~NetMan() = default;
/// ashirtGet generates a basic GET request to the ashirt API server. No authentication is /// ashirtGet generates a basic GET request to the ashirt API server. No authentication is
/// provided (use addASHIRTAuth to do this) /// provided (use addASHIRTAuth to do this)