Fixed memory leak in HTTP server

This commit is contained in:
Christophe Dumez 2008-09-12 19:58:57 +00:00
parent 918c1507d3
commit e21c28e9d2
2 changed files with 4 additions and 2 deletions

View file

@ -46,13 +46,14 @@ HttpServer::HttpServer(bittorrent *BTSession, int msec, QObject* parent) : QTcpS
connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), manager, SLOT(addedTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(deletedTorrent(QString)), manager, SLOT(deletedTorrent(QString)));
//set timer
QTimer *timer = new QTimer(this);
timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(onTimer()));
timer->start(msec);
}
HttpServer::~HttpServer()
{
delete timer;
delete manager;
}