fix(agc): release the current address space with the image mirrors

ClearImageMirrors drops the mirror map before the device is destroyed,
but the current address space in Spaces() still held its mirrors, so
they were freed by the cache's static destructor from the driver's DLL
detach, after the Vulkan driver was unloaded, and every exit crashed on
Windows. The teardown now releases the current address space too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
LeandroLP23
2026-10-07 10:53:33 +02:00
parent 219a1cf8d2
commit db26339a5f
@@ -1013,6 +1013,7 @@ void ClearImageMirrors(VkDevice device) {
state.heapBytes = 0;
state.device = VK_NULL_HANDLE;
}
Spaces().current.store(nullptr);
}
ImportProbe ProbeImportWriteProtection(const Context& context) {