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:
QNetworkAccessManager *nam;
NetMan() { nam = new QNetworkAccessManager; }
~NetMan() {
delete nam;
stopReply(&allOpsReply);
stopReply(&githubReleaseReply);
NetMan(QObject * parent = nullptr)
: QObject(parent)
, nam(new QNetworkAccessManager(this))
{
}
~NetMan() = default;
/// ashirtGet generates a basic GET request to the ashirt API server. No authentication is
/// provided (use addASHIRTAuth to do this)