From d98d9c9e72558ffbeb08685bf9096e3040944fcf Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 13 Nov 2017 12:49:33 +0000 Subject: [PATCH] FIxed two CoverityScan detected memory leaks --- src/osgAnimation/MorphTransformHardware.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgAnimation/MorphTransformHardware.cpp b/src/osgAnimation/MorphTransformHardware.cpp index ad2a6859d..b960ef650 100644 --- a/src/osgAnimation/MorphTransformHardware.cpp +++ b/src/osgAnimation/MorphTransformHardware.cpp @@ -100,12 +100,12 @@ bool MorphTransformHardware::init(MorphGeometry& morphGeometry) } } - osg::TextureBuffer * morphTargetsTBO=new osg::TextureBuffer(); + osg::ref_ptr morphTargetsTBO=new osg::TextureBuffer(); morphTargetsTBO->setBufferData(morphTargets); morphTargetsTBO->setInternalFormat( GL_RGB32F_ARB ); //create TBO Texture handle - osg::Uniform * morphTBOHandle=new osg::Uniform(osg::Uniform::SAMPLER_BUFFER,"morphTargets"); + osg::ref_ptr morphTBOHandle=new osg::Uniform(osg::Uniform::SAMPLER_BUFFER,"morphTargets"); morphTBOHandle->set((int)_reservedTextureUnit); //create dynamic uniform for morphtargets animation weights