diff options
Diffstat (limited to 'src/server')
-rw-r--r-- | src/server/Engine.cpp | 6 | ||||
-rw-r--r-- | src/server/JackDriver.cpp | 5 | ||||
-rw-r--r-- | src/server/Worker.cpp | 3 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/server/Engine.cpp b/src/server/Engine.cpp index 7e1e2ffc..9bcc9163 100644 --- a/src/server/Engine.cpp +++ b/src/server/Engine.cpp @@ -79,6 +79,7 @@ Engine::Engine(Ingen::World* world) Engine::~Engine() { + _root_graph = NULL; deactivate(); const SharedPtr<Store> s = this->store(); @@ -99,6 +100,11 @@ Engine::~Engine() delete _control_bindings; delete _broadcaster; delete _event_writer; + delete _worker; + + _driver.reset(); + + delete _buffer_factory; munlockall(); } diff --git a/src/server/JackDriver.cpp b/src/server/JackDriver.cpp index ac3393a2..fd6b2631 100644 --- a/src/server/JackDriver.cpp +++ b/src/server/JackDriver.cpp @@ -66,9 +66,14 @@ JackDriver::JackDriver(Engine& engine) &_forge, &engine.world()->uri_map().urid_map_feature()->urid_map); } +struct PortDisposer { + void operator()(EnginePort* port) { delete port; } +}; + JackDriver::~JackDriver() { deactivate(); + _ports.clear_and_dispose(PortDisposer()); if (_client) jack_client_close(_client); diff --git a/src/server/Worker.cpp b/src/server/Worker.cpp index 68300a16..5bf20609 100644 --- a/src/server/Worker.cpp +++ b/src/server/Worker.cpp @@ -115,6 +115,9 @@ Worker::Worker(Log& log, uint32_t buffer_size) Worker::~Worker() { + _exit_flag = true; + _sem.post(); + join(); free(_buffer); } |