From a83d2ffdd75aa652da538d7a4fcafbc2d93d7188 Mon Sep 17 00:00:00 2001 From: stangamecai Date: Mon, 16 Oct 2023 19:50:50 +0800 Subject: [PATCH] - [bug fix] fixed memory leak issue in UI_Pass; --- engine/source/runtime/function/render/passes/ui_pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/source/runtime/function/render/passes/ui_pass.cpp b/engine/source/runtime/function/render/passes/ui_pass.cpp index 0caef5c89..c81bbda53 100644 --- a/engine/source/runtime/function/render/passes/ui_pass.cpp +++ b/engine/source/runtime/function/render/passes/ui_pass.cpp @@ -49,7 +49,7 @@ namespace Piccolo allocInfo.commandPool = m_rhi->getCommandPoor(); allocInfo.commandBufferCount = 1; - RHICommandBuffer* commandBuffer = new VulkanCommandBuffer(); + RHICommandBuffer* commandBuffer = nullptr; if (RHI_SUCCESS != m_rhi->allocateCommandBuffers(&allocInfo, commandBuffer)) { throw std::runtime_error("failed to allocate command buffers!");