diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-09-08 11:40:30 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-08 14:23:04 +0300 |
commit | 0d68f55789aff106bdf9e038812d358ca55c060f (patch) | |
tree | 7f7f6d32f7a8de24106ac51e5e686f305274247f /source/blender/gpu | |
parent | 489aeabb9e500ab852a42e73b4e19cf1e80c62ba (diff) |
DrawManager: Fixed memory leak in test cases
Memory leak is introduced as test cases reinitializes the GPU stack.
Added a call to GPU_backend_exit to fix this.
In GPU_backend_exit the GPU backend was destroyed but the pointer wasn't
reset for reuse. This patch also clears the pointer to be reused.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/intern/gpu_context.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_context.cc b/source/blender/gpu/intern/gpu_context.cc index 188225b3eed..119c1ef9c55 100644 --- a/source/blender/gpu/intern/gpu_context.cc +++ b/source/blender/gpu/intern/gpu_context.cc @@ -185,6 +185,7 @@ void GPU_backend_exit(void) /* TODO assert no resource left. Currently UI textures are still not freed in their context * correctly. */ delete g_backend; + g_backend = NULL; } GPUBackend *GPUBackend::get(void) |