[Bf-blender-cvs] [25e0d01c5cc] temp-eevee-next-cryptomatte: Fix: Memory leak in realtime compositor

Omar Emara noreply at git.blender.org
Tue Aug 23 12:59:54 CEST 2022


Commit: 25e0d01c5cc4541e68d2a8e35b7cfa5861cba16b
Author: Omar Emara
Date:   Mon Aug 22 10:57:24 2022 +0200
Branches: temp-eevee-next-cryptomatte
https://developer.blender.org/rB25e0d01c5cc4541e68d2a8e35b7cfa5861cba16b

Fix: Memory leak in realtime compositor

There was a memory leak in the GPU code generator for the compositor
output. It was just due to a missing free in the GPU code generator
destructor, so this patch makes sure it is freed.

===================================================================

M	source/blender/gpu/intern/gpu_codegen.cc

===================================================================

diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc
index 4a45a3e63ed..2e1cb6b4a22 100644
--- a/source/blender/gpu/intern/gpu_codegen.cc
+++ b/source/blender/gpu/intern/gpu_codegen.cc
@@ -259,6 +259,7 @@ class GPUCodegen {
     MEM_SAFE_FREE(output.volume);
     MEM_SAFE_FREE(output.thickness);
     MEM_SAFE_FREE(output.displacement);
+    MEM_SAFE_FREE(output.composite);
     MEM_SAFE_FREE(output.material_functions);
     delete create_info;
     BLI_freelistN(&ubo_inputs_);



More information about the Bf-blender-cvs mailing list