Vulkan: Free allocator safely on exit.

This commit is contained in:
Unknown W. Brackets committed 2016-05-06 19:52:46 -07:00
1 parent 5eb66fe167
commit 844d96f055
1 file changed
+6 -1
+6 -1
View File
@@ -147,7 +147,12 @@ TextureCacheVulkan::TextureCacheVulkan(VulkanContext *vulkan)
TextureCacheVulkan::~TextureCacheVulkan() {
Clear(true);
allocator_->Destroy();
delete allocator_;
// We have to delete on queue, so this can free its queued deletions.
vulkan_->Delete().QueueCallback([](void *ptr) {
auto allocator = static_cast<VulkanDeviceAllocator *>(ptr);
delete allocator;
}, allocator_);
}
void TextureCacheVulkan::DownloadFramebufferForClut(u32 clutAddr, u32 bytes) {