修复Vulkan Surface没有释放问题,丰富部分日志

This commit is contained in:
2026-01-04 21:46:26 +08:00
parent 473e5b57df
commit 3f5f4a8cc0
8 changed files with 37 additions and 14 deletions

View File

@@ -126,13 +126,6 @@ namespace mirai {
return flags;
}
vma_allocator::~vma_allocator() {
if (vma_allocator_) {
vma_allocator_.destroy();
vma_allocator_ = nullptr;
}
}
result_t<buffer_allocation> vma_allocator::alloc_buffer(const buffer_create_info& info) {
buffer_allocation alloc;
@@ -160,4 +153,13 @@ namespace mirai {
}
return {};
}
void vma_allocator::on_destroying() {
object::on_destroying();
MIRAI_LOG_INFO("VMA 分配器正在销毁");
if (vma_allocator_) {
vma_allocator_.destroy();
vma_allocator_ = nullptr;
}
}
}