summaryrefslogtreecommitdiffstats
path: root/src/core/jobs/qthreadpooler_p.h
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2020-03-03 16:24:51 +0000
committerMike Krus <mike.krus@kdab.com>2020-03-04 06:11:25 +0000
commitfd520c2b9e3c57e4f63c60e6fe27af00b7b427c4 (patch)
tree368237831a87a6a85809ec7f6752c1d32a2f7753 /src/core/jobs/qthreadpooler_p.h
parent2f8c7dd69c9d234b03ea0262e5246ceaaaa444db (diff)
Fix memory leaks
Some jobs get skipped because they don't have anything to do. However, since the runnable does not get submitted to the pool, it would leak (along with the job it points to). Also fixed a couple of compile warnings. Change-Id: I7a25649f2f760c0593862328c0ab905da98c982a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Diffstat (limited to 'src/core/jobs/qthreadpooler_p.h')
-rw-r--r--src/core/jobs/qthreadpooler_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/jobs/qthreadpooler_p.h b/src/core/jobs/qthreadpooler_p.h
index fafd549b2..43a67033e 100644
--- a/src/core/jobs/qthreadpooler_p.h
+++ b/src/core/jobs/qthreadpooler_p.h
@@ -81,6 +81,7 @@ public:
private:
void enqueueTasks(const QVector<RunnableInterface *> &tasks);
+ void skipTask(RunnableInterface *task);
void enqueueDepencies(RunnableInterface *task);
void acquire(int add);
void release();