diff options
Diffstat (limited to 'src/util/uv.cpp')
-rw-r--r-- | src/util/uv.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/uv.cpp b/src/util/uv.cpp index 94f074bfa1..6e15ac4537 100644 --- a/src/util/uv.cpp +++ b/src/util/uv.cpp @@ -16,4 +16,16 @@ std::string cwd() { return dir; } +void deleter::operator()(uv_async_t *async) { + uv_close((uv_handle_t *)async, [](uv_handle_t *handle) { + delete (uv_async_t *)handle; + }); +} + +void deleter::operator()(uv_timer_t *timer) { + uv_close((uv_handle_t *)timer, [](uv_handle_t *handle) { + delete (uv_timer_t *)handle; + }); +} + } |