File tree 2 files changed +7
-1
lines changed
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -398,10 +398,10 @@ static struct {
398
398
}
399
399
400
400
void Dispose () {
401
+ tracing_agent_.reset (nullptr );
401
402
platform_->Shutdown ();
402
403
delete platform_;
403
404
platform_ = nullptr ;
404
- tracing_agent_.reset (nullptr );
405
405
}
406
406
407
407
void DrainVMTasks (Isolate* isolate) {
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ Agent::Agent() {
59
59
Agent* agent = ContainerOf (&Agent::initialize_writer_async_, async);
60
60
agent->InitializeWritersOnThread ();
61
61
}), 0 );
62
+ uv_unref (reinterpret_cast <uv_handle_t *>(&initialize_writer_async_));
62
63
}
63
64
64
65
void Agent::InitializeWritersOnThread () {
@@ -72,6 +73,11 @@ void Agent::InitializeWritersOnThread() {
72
73
}
73
74
74
75
Agent::~Agent () {
76
+ categories_.clear ();
77
+ writers_.clear ();
78
+
79
+ StopTracing ();
80
+
75
81
uv_close (reinterpret_cast <uv_handle_t *>(&initialize_writer_async_), nullptr );
76
82
uv_run (&tracing_loop_, UV_RUN_ONCE);
77
83
CheckedUvLoopClose (&tracing_loop_);
You can’t perform that action at this time.
0 commit comments