Skip to content

Commit

Permalink
Correctly cleanup child process context
Browse files Browse the repository at this point in the history
  • Loading branch information
Aidan63 committed Mar 30, 2024
1 parent 98b9889 commit 78bf9e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hx/libs/asys/libuv/system/LibuvChildProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ void hx::asys::libuv::system::LibuvChildProcess::exitCode(Dynamic cbSuccess, Dyn

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

cbSuccess();
}

0 comments on commit 78bf9e8

Please sign in to comment.