FIxed two CoverityScan detected memory leaks

This commit is contained in:
Robert Osfield 2017-11-13 12:49:33 +00:00
parent a811de2ba7
commit d98d9c9e72

View File

@ -100,12 +100,12 @@ bool MorphTransformHardware::init(MorphGeometry& morphGeometry)
}
}
osg::TextureBuffer * morphTargetsTBO=new osg::TextureBuffer();
osg::ref_ptr<osg::TextureBuffer> 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<osg::Uniform> morphTBOHandle=new osg::Uniform(osg::Uniform::SAMPLER_BUFFER,"morphTargets");
morphTBOHandle->set((int)_reservedTextureUnit);
//create dynamic uniform for morphtargets animation weights