File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,16 @@ void Dispatcher::Activate() {
74
74
}
75
75
}
76
76
77
+ void Dispatcher::AsyncHandleCloseCallback (uv_handle_t *handle) {
78
+ uv_async_t *a = reinterpret_cast <uv_async_t *>(handle);
79
+ delete a;
80
+ }
81
+
77
82
// Should be able to run this regardless of whether it is active or not
78
83
void Dispatcher::Deactivate () {
79
84
if (async) {
80
- uv_close (reinterpret_cast <uv_handle_t *>(async), NULL );
85
+ uv_close (reinterpret_cast <uv_handle_t *>(async),
86
+ Dispatcher::AsyncHandleCloseCallback);
81
87
async = NULL ;
82
88
}
83
89
}
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class Dispatcher {
53
53
static_cast <Dispatcher*>(async->data );
54
54
dispatcher->Flush ();
55
55
}
56
+ static void AsyncHandleCloseCallback (uv_handle_t *);
56
57
57
58
uv_async_t *async;
58
59
};
You can’t perform that action at this time.
0 commit comments