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() {
7474 }
7575}
7676
77+ void Dispatcher::AsyncHandleCloseCallback (uv_handle_t *handle) {
78+ uv_async_t *a = reinterpret_cast <uv_async_t *>(handle);
79+ delete a;
80+ }
81+
7782// Should be able to run this regardless of whether it is active or not
7883void Dispatcher::Deactivate () {
7984 if (async) {
80- uv_close (reinterpret_cast <uv_handle_t *>(async), NULL );
85+ uv_close (reinterpret_cast <uv_handle_t *>(async),
86+ Dispatcher::AsyncHandleCloseCallback);
8187 async = NULL ;
8288 }
8389}
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class Dispatcher {
5353 static_cast <Dispatcher*>(async->data );
5454 dispatcher->Flush ();
5555 }
56+ static void AsyncHandleCloseCallback (uv_handle_t *);
5657
5758 uv_async_t *async;
5859};
You can’t perform that action at this time.
0 commit comments