diff --git a/src/tracing/agent.cc b/src/tracing/agent.cc index 641c476c1d8df7..ad842db63630dc 100644 --- a/src/tracing/agent.cc +++ b/src/tracing/agent.cc @@ -2,6 +2,8 @@ #include #include "tracing/node_trace_buffer.h" +#include "debug_utils.h" +#include "env-inl.h" namespace node { namespace tracing { @@ -53,6 +55,10 @@ Agent::Agent() { CHECK_EQ(uv_loop_init(&tracing_loop_), 0); } +Agent::~Agent() { + CheckedUvLoopClose(&tracing_loop_); +} + void Agent::Start() { if (started_) return; diff --git a/src/tracing/agent.h b/src/tracing/agent.h index b62dc5fe5bc9d5..e8bf727c505ce3 100644 --- a/src/tracing/agent.h +++ b/src/tracing/agent.h @@ -64,6 +64,7 @@ class AgentWriterHandle { class Agent { public: Agent(); + ~Agent(); TracingController* GetTracingController() { return tracing_controller_; }