summaryrefslogtreecommitdiffstats
path: root/src/server/events/Disconnect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events/Disconnect.cpp')
-rw-r--r--src/server/events/Disconnect.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/server/events/Disconnect.cpp b/src/server/events/Disconnect.cpp
index e803ce3d..3abf23e4 100644
--- a/src/server/events/Disconnect.cpp
+++ b/src/server/events/Disconnect.cpp
@@ -44,15 +44,9 @@ Disconnect::Disconnect(Engine& engine,
: Event(engine, client, msg.seq, timestamp)
, _msg(msg)
, _graph(nullptr)
- , _impl(nullptr)
{
}
-Disconnect::~Disconnect()
-{
- delete _impl;
-}
-
Disconnect::Impl::Impl(Engine& e,
GraphImpl* graph,
PortImpl* t,
@@ -154,10 +148,10 @@ Disconnect::pre_process(PreProcessContext& ctx)
return Event::pre_process_done(Status::PARENT_NOT_FOUND, _msg.head);
}
- _impl = new Impl(_engine,
- _graph,
- dynamic_cast<PortImpl*>(tail),
- dynamic_cast<InputPort*>(head));
+ _impl = make_unique<Impl>(_engine,
+ _graph,
+ dynamic_cast<PortImpl*>(tail),
+ dynamic_cast<InputPort*>(head));
_compiled_graph = ctx.maybe_compile(*_engine.maid(), *_graph);