diff --git a/src/dynarmic/backend/x64/exception_handler_macos.cpp b/src/dynarmic/backend/x64/exception_handler_macos.cpp index fbec78b1..5991d1c0 100644 --- a/src/dynarmic/backend/x64/exception_handler_macos.cpp +++ b/src/dynarmic/backend/x64/exception_handler_macos.cpp @@ -76,11 +76,11 @@ MachHandler::MachHandler() { #undef KCHECK thread = std::thread(&MachHandler::MessagePump, this); + thread.detach(); } MachHandler::~MachHandler() { - mach_port_destroy(mach_task_self(), server_port); - thread.join(); + mach_port_deallocate(mach_task_self(), server_port); } void MachHandler::MessagePump() {