diff options
author | Justin Berger <j.david.berger@gmail.com> | 2017-07-19 18:47:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-31 19:35:03 (GMT) |
commit | 546a58746967d10996075ca47a7198c1c375fdb2 (patch) | |
tree | 34c4e2f757e1cbeac3dc07c1dd5d06398821ba68 /Source/cmConnection.h | |
parent | 9bad65940c87f594a5f1007019d4b187068dbce0 (diff) | |
download | CMake-546a58746967d10996075ca47a7198c1c375fdb2.zip CMake-546a58746967d10996075ca47a7198c1c375fdb2.tar.gz CMake-546a58746967d10996075ca47a7198c1c375fdb2.tar.bz2 |
server: Fixed mismatched new/delete; added proper shutdown procedure
Diffstat (limited to 'Source/cmConnection.h')
-rw-r--r-- | Source/cmConnection.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmConnection.h b/Source/cmConnection.h index f9d50de..b1b51fe 100644 --- a/Source/cmConnection.h +++ b/Source/cmConnection.h @@ -100,7 +100,12 @@ public: uv_stream_t* WriteStream = nullptr; static void on_close(uv_handle_t* handle); - static void on_close_delete(uv_handle_t* handle); + + template <typename T> + static void on_close_delete(uv_handle_t* handle) + { + delete reinterpret_cast<T*>(handle); + } protected: std::string RawReadBuffer; |