diff options
Diffstat (limited to 'src/server/events/Delete.cpp')
-rw-r--r-- | src/server/events/Delete.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/server/events/Delete.cpp b/src/server/events/Delete.cpp index 4e1aa69b..f6168c9c 100644 --- a/src/server/events/Delete.cpp +++ b/src/server/events/Delete.cpp @@ -51,7 +51,6 @@ Delete::Delete(Engine& engine, Delete::~Delete() { - delete _disconnect_event; for (ControlBindings::Binding* b : _removed_bindings) { delete b; } @@ -92,12 +91,14 @@ Delete::pre_process(PreProcessContext& ctx) if (_block) { parent->remove_block(*_block); - _disconnect_event = new DisconnectAll(_engine, parent, _block.get()); + _disconnect_event = + make_unique<DisconnectAll>(_engine, parent, _block.get()); _disconnect_event->pre_process(ctx); _compiled_graph = ctx.maybe_compile(*_engine.maid(), *parent); } else if (_port) { parent->remove_port(*_port); - _disconnect_event = new DisconnectAll(_engine, parent, _port.get()); + _disconnect_event = + make_unique<DisconnectAll>(_engine, parent, _port.get()); _disconnect_event->pre_process(ctx); _compiled_graph = ctx.maybe_compile(*_engine.maid(), *parent); |