Skip to content

Commit 78bf9e8

Browse files
committed
Correctly cleanup child process context
1 parent 98b9889 commit 78bf9e8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/hx/libs/asys/libuv/system/LibuvChildProcess.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ void hx::asys::libuv::system::LibuvChildProcess::exitCode(Dynamic cbSuccess, Dyn
101101

102102
void hx::asys::libuv::system::LibuvChildProcess::close(Dynamic cbSuccess, Dynamic cbFailure)
103103
{
104-
uv_close(reinterpret_cast<uv_handle_t*>(&ctx->request), hx::asys::libuv::clean_handle);
104+
uv_close(reinterpret_cast<uv_handle_t*>(&ctx->request), [](uv_handle_t* handle) {
105+
delete reinterpret_cast<hx::asys::libuv::system::LibuvChildProcess::Ctx*>(handle->data);
106+
});
105107

106108
cbSuccess();
107109
}

0 commit comments

Comments
 (0)