32 {
33
34 switch (handle->type) {
35 case UV_ASYNC:
36 delete (uv_async_t *)handle;
37 break;
38 case UV_CHECK:
39 delete (uv_check_t *)handle;
40 break;
41 case UV_FS_EVENT:
42 delete (uv_fs_event_t *)handle;
43 break;
44 case UV_FS_POLL:
45 delete (uv_fs_poll_t *)handle;
46 break;
47 case UV_HANDLE:
48 delete handle;
49 break;
50 case UV_IDLE:
51 delete (uv_idle_t *)handle;
52 break;
53 case UV_POLL:
54 delete (uv_poll_t *)handle;
55 break;
56 case UV_PREPARE:
57 delete (uv_prepare_t *)handle;
58 break;
59 case UV_PROCESS:
60 delete (uv_process_t *)handle;
61 break;
62 case UV_STREAM:
63 delete (uv_stream_t *)handle;
64 break;
65 case UV_TCP:
66 delete (uv_tcp_t *)handle;
67 break;
68 case UV_UDP:
69 delete (uv_udp_t *)handle;
70 break;
71 case UV_NAMED_PIPE:
72 delete (uv_pipe_t *)handle;
73 break;
74 case UV_TTY:
75 delete (uv_tty_t *)handle;
76 break;
77 case UV_TIMER:
78 delete (uv_timer_t *)handle;
79 break;
80 default:
81 fmt::print("WARN: unhandled handle type {}\n", (int)handle->type);
82 BOOST_ASSERT_MSG(false, "unhandled handle type");
83 }
84}