mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
When a heap was released at the same time as the last resource on that heap, it was possible for both to see each other's refcount/resource_count as 0 and both would try to destroy the heap. Avoid that by converting "resource_count" to an internal refcount, which holds an extra +1 if the main refcount is nonzero. The final release will then be synchronized between the two since both will operate on "internal_refcount".