diff options
author | Dan Vrátil <dvratil@redhat.com> | 2015-02-07 17:51:41 +0100 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2015-02-07 17:51:41 +0100 |
commit | 38afbed3704c5d21db26758d9ce78078710abaa8 (patch) | |
tree | 98864e9bec1cc151042ec7dff46a9897842f92e9 /async/src/async.cpp | |
parent | 7a3ecf3d79ffd8d4c207b42625552da3d57589f5 (diff) | |
download | sink-38afbed3704c5d21db26758d9ce78078710abaa8.tar.gz sink-38afbed3704c5d21db26758d9ce78078710abaa8.zip |
Async: don't leak Executors
We now hold executors in shared pointers. We cannot easilly delete them, as they
are referenced from two objects (the Job they belong to, and the next job), and
the lifetime of the jobs is unclear.
Diffstat (limited to 'async/src/async.cpp')
-rw-r--r-- | async/src/async.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/async/src/async.cpp b/async/src/async.cpp index 921a6b5..c9fedc7 100644 --- a/async/src/async.cpp +++ b/async/src/async.cpp | |||
@@ -24,7 +24,7 @@ | |||
24 | 24 | ||
25 | using namespace Async; | 25 | using namespace Async; |
26 | 26 | ||
27 | Private::ExecutorBase::ExecutorBase(ExecutorBase* parent) | 27 | Private::ExecutorBase::ExecutorBase(const ExecutorBasePtr &parent) |
28 | : mPrev(parent) | 28 | : mPrev(parent) |
29 | , mResult(0) | 29 | , mResult(0) |
30 | { | 30 | { |
@@ -36,7 +36,7 @@ Private::ExecutorBase::~ExecutorBase() | |||
36 | } | 36 | } |
37 | 37 | ||
38 | 38 | ||
39 | JobBase::JobBase(Private::ExecutorBase *executor) | 39 | JobBase::JobBase(const Private::ExecutorBasePtr &executor) |
40 | : mExecutor(executor) | 40 | : mExecutor(executor) |
41 | { | 41 | { |
42 | } | 42 | } |