diff options
author | David Robillard <d@drobilla.net> | 2017-02-11 15:55:58 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-02-12 11:11:14 +0100 |
commit | b6b8f7b3371c6c27055ec1fba970de56dd057a01 (patch) | |
tree | 9e8bd44a1c4196e962f87c0c68e8f0dc09554806 /src/server/RunContext.cpp | |
parent | 740b0b7874c0393a14354eb447d689bc30da3eac (diff) | |
download | ingen-b6b8f7b3371c6c27055ec1fba970de56dd057a01.tar.gz ingen-b6b8f7b3371c6c27055ec1fba970de56dd057a01.tar.bz2 ingen-b6b8f7b3371c6c27055ec1fba970de56dd057a01.zip |
Fix memory leaks
Diffstat (limited to 'src/server/RunContext.cpp')
-rw-r--r-- | src/server/RunContext.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/server/RunContext.cpp b/src/server/RunContext.cpp index 1ab73605..81b59552 100644 --- a/src/server/RunContext.cpp +++ b/src/server/RunContext.cpp @@ -75,9 +75,6 @@ RunContext::RunContext(const RunContext& copy) , _realtime(copy._realtime) {} -RunContext::~RunContext() -{} - bool RunContext::must_notify(const PortImpl* port) const { @@ -159,6 +156,17 @@ RunContext::set_priority(int priority) } void +RunContext::join() +{ + if (_thread) { + if (_thread->joinable()) { + _thread->join(); + } + delete _thread; + } +} + +void RunContext::run() { while (_engine.wait_for_tasks()) { |