summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/World.cpp8
-rw-r--r--src/server/Engine.cpp6
-rw-r--r--src/server/JackDriver.cpp5
-rw-r--r--src/server/Worker.cpp3
4 files changed, 15 insertions, 7 deletions
diff --git a/src/World.cpp b/src/World.cpp
index bcdc4d70..0ad655a9 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -143,8 +143,8 @@ public:
serialiser.reset();
parser.reset();
interface.reset();
- engine.reset();
store.reset();
+ engine.reset();
interface_factories.clear();
script_runners.clear();
@@ -276,12 +276,6 @@ World::run_module(const char* name)
return true;
}
-void
-World::unload_modules()
-{
- _impl->modules.clear();
-}
-
/** Get an interface for a remote engine at @a url
*/
SharedPtr<Interface>
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);
}