Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-02-05 15:59:46 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-02-05 15:59:46 +0300
commitcbd23a7304568a95bf9eb814a16b8088585a9f8a (patch)
tree53bff4eb331ec679d2878452d9ae4a037b1cc590 /source/blender/draw
parente5af6a0d0ff861a278f896e9a643de1a0e5ce0dc (diff)
DRW: Fix memory leak in UniformArrayBuffer
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/intern/DRW_gpu_wrapper.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh
index 4d7325f6c2d..d4491223c10 100644
--- a/source/blender/draw/intern/DRW_gpu_wrapper.hh
+++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh
@@ -295,6 +295,10 @@ class UniformArrayBuffer : public detail::UniformCommon<T, len, false> {
/* TODO(@fclem): We should map memory instead. */
this->data_ = (T *)MEM_mallocN_aligned(len * sizeof(T), 16, this->name_);
}
+ ~UniformArrayBuffer()
+ {
+ MEM_freeN(this->data_);
+ }
};
template<