From e3ce59ee80c6835c9d489c462dd517e512586a8c Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sat, 22 Aug 2020 16:08:58 -0500 Subject: [PATCH] REVIEW: Memory Leak - Effect::buildAttribute() 144,400 bytes in 38 blocks are indirectly lost --- simgear/scene/material/Effect.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/simgear/scene/material/Effect.cxx b/simgear/scene/material/Effect.cxx index b7eb0b7a..52f2572c 100644 --- a/simgear/scene/material/Effect.cxx +++ b/simgear/scene/material/Effect.cxx @@ -1101,6 +1101,9 @@ struct UniformBuilder :public PassAttributeBuilder uniform = colorMode[val]; } } + + // REVIEW: Memory Leak - 144,400 bytes in 38 blocks are indirectly lost + // Leak occurs within OSG, likely caused by passing a raw pointer pass->addUniform(uniform.get()); if (positionedProp && positionedProp->getBoolValue() && uniformType == Uniform::FLOAT_VEC4) { osg::Vec4 offset;