diff options
author | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-03-06 10:23:19 +0000 |
commit | 059f20c9666234f2be01498ee04f1e7ee795ba8f (patch) | |
tree | ef0d53073d53012aeaa7d084fccf477b166c0684 /src/engine/events/Delete.cpp | |
parent | 085a451dfec54126be1b9346899c81d82e6eb58e (diff) | |
download | ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.gz ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.tar.bz2 ingen-059f20c9666234f2be01498ee04f1e7ee795ba8f.zip |
Save Ingen patches as working standard LV2 plugin bundles.
This allows you to create an Ingen patch in Ingen running as a Jack client,
save it, then load that patch as an LV2 plugin in any LV2 compliant host.
Eliminate (hopefully) all static data in the engine (for multiple instantiations in a single process).
More API/ABI stable interface for Ingen::Shared::World.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2533 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/Delete.cpp')
-rw-r--r-- | src/engine/events/Delete.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp index 9e4548ac..45c54260 100644 --- a/src/engine/events/Delete.cpp +++ b/src/engine/events/Delete.cpp @@ -42,6 +42,7 @@ Delete::Delete(Engine& engine, SharedPtr<Request> request, FrameTime time, const : QueuedEvent(engine, request, time, true) , _path(path) , _store_iterator(engine.engine_store()->end()) + , _garbage(NULL) , _driver_port(NULL) , _patch_node_listnode(NULL) , _patch_port_listnode(NULL) @@ -153,9 +154,8 @@ Delete::execute(ProcessContext& context) _engine.maid()->push(_port->parent_patch()->external_ports()); _port->parent_patch()->external_ports(_ports_array); - if ( ! _port->parent_patch()->parent()) { - _driver_port = _engine.driver()->remove_port(_port->path()); - } + if ( ! _port->parent_patch()->parent()) + _garbage = _engine.driver()->remove_port(_port->path(), &_driver_port); } if (parent_patch) { @@ -201,10 +201,10 @@ Delete::post_process() _request->respond_error("Unable to delete object " + _path.chop_scheme()); } - if (_driver_port) { - _driver_port->elem()->destroy(); - _engine.maid()->push(_driver_port); - } + if (_driver_port) + _driver_port->destroy(); + + _engine.maid()->push(_garbage); } |