mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Don't leak HttpGet objects in ZipInstaller.
When creating a new HttpGet object schedule any old one for deletion instead of dropping its reference and relying on Qt to clean it up once the parent object is removed. Change-Id: I66f2a6f01c6b6ad3a0dce0eb4fd3eacfaf7e733d
This commit is contained in:
parent
ef9eea7fd2
commit
e50066718c
1 changed files with 2 additions and 0 deletions
|
@ -25,6 +25,7 @@ ZipInstaller::ZipInstaller(QObject* parent): QObject(parent)
|
|||
{
|
||||
m_unzip = true;
|
||||
m_usecache = false;
|
||||
getter = 0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -87,6 +88,7 @@ void ZipInstaller::installStart()
|
|||
m_file = downloadFile->fileName();
|
||||
downloadFile->close();
|
||||
// get the real file.
|
||||
if(getter != 0) getter->deleteLater();
|
||||
getter = new HttpGet(this);
|
||||
if(m_usecache) {
|
||||
getter->setCache(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue