fix(shm_win): Use mem::$delete instead of mem::free in release()

The acquire() function allocates id_info_t using mem::$new<id_info_t>(),
so the release() function must use mem::$delete(ii) to deallocate it,
not mem::free(ii). This ensures proper allocation/deallocation pairing.

Issue: Memory allocated with mem::$new must be freed with mem::$delete
to maintain consistent memory management semantics.
This commit is contained in:
木头云 2025-12-03 08:48:02 +00:00
parent b35de5a154
commit 2815fe0163

View File

@ -161,7 +161,7 @@ std::int32_t release(id_t id) noexcept {
ipc::error("fail release: invalid id (h = null)\n"); ipc::error("fail release: invalid id (h = null)\n");
} }
else ::CloseHandle(ii->h_); else ::CloseHandle(ii->h_);
mem::free(ii); mem::$delete(ii);
return ret; return ret;
} }