修复Vulkan Surface没有释放问题,丰富部分日志
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user