Skip to content

Commit

Permalink
vk: Fix cleanup logic in VulkanStagePool::terminate (#8484)
Browse files Browse the repository at this point in the history
Updated the `terminate` function to correct resource cleanup. Changed `mUsedStages` to `mUsedImages` and `mFreeStages` to `mFreeImages` to ensure proper memory management during termination.
  • Loading branch information
haneulk730 authored Mar 5, 2025
1 parent 14e3ae5 commit 4ede119
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filament/backend/src/vulkan/VulkanStagePool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,13 +208,13 @@ void VulkanStagePool::terminate() noexcept {
vmaDestroyImage(mAllocator, image->image, image->memory);
delete image;
}
mUsedStages.clear();
mUsedImages.clear();

for (auto image : mFreeImages) {
vmaDestroyImage(mAllocator, image->image, image->memory);
delete image;
}
mFreeStages.clear();
mFreeImages.clear();
}

} // namespace filament::backend

0 comments on commit 4ede119

Please sign in to comment.