diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-06 17:52:33 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-07-06 17:52:33 +0200 |
commit | 1803924a9474af03bf24bc00303c6373fdd05487 (patch) | |
tree | 25c77a9c4c8831d93ffe687d49a3aefaa5a184ca /common/resourceaccess.cpp | |
parent | 141f945b8d6828372e8919e954fa2d8991aa1a6f (diff) | |
download | sink-1803924a9474af03bf24bc00303c6373fdd05487.tar.gz sink-1803924a9474af03bf24bc00303c6373fdd05487.zip |
Fixed a bunch of memory leaks.
Found with valgrind
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 8297fa5..93f97e8 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -643,6 +643,7 @@ Sink::ResourceAccess::Ptr ResourceAccessFactory::getAccess(const QByteArray &ins | |||
643 | } | 643 | } |
644 | if (!mTimer.contains(instanceIdentifier)) { | 644 | if (!mTimer.contains(instanceIdentifier)) { |
645 | auto timer = new QTimer; | 645 | auto timer = new QTimer; |
646 | timer->setSingleShot(true); | ||
646 | // Drop connection after 3 seconds (which is a random value) | 647 | // Drop connection after 3 seconds (which is a random value) |
647 | QObject::connect(timer, &QTimer::timeout, timer, [this, instanceIdentifier]() { mCache.remove(instanceIdentifier); }); | 648 | QObject::connect(timer, &QTimer::timeout, timer, [this, instanceIdentifier]() { mCache.remove(instanceIdentifier); }); |
648 | timer->setInterval(3000); | 649 | timer->setInterval(3000); |