exception_handler_macos: Avoid use of deprecated function mach_port_destroy

This commit is contained in:
Merry 2022-05-17 20:47:13 +01:00
parent e007d94133
commit b1dc11a32d

View file

@ -76,11 +76,11 @@ MachHandler::MachHandler() {
#undef KCHECK #undef KCHECK
thread = std::thread(&MachHandler::MessagePump, this); thread = std::thread(&MachHandler::MessagePump, this);
thread.detach();
} }
MachHandler::~MachHandler() { MachHandler::~MachHandler() {
mach_port_destroy(mach_task_self(), server_port); mach_port_deallocate(mach_task_self(), server_port);
thread.join();
} }
void MachHandler::MessagePump() { void MachHandler::MessagePump() {