1
0
Fork 0

REVIEW: Memory Leak - wxRadarBg::init()

4,096 bytes in 1 blocks are indirectly lost
This commit is contained in:
Scott Giese 2020-08-22 21:48:52 -05:00
parent 6c14eaa6e8
commit 9d6239031f

View file

@ -210,10 +210,12 @@ wxRadarBg::init ()
// Initially allocate space for 128 quads // Initially allocate space for 128 quads
_vertices = new osg::Vec2Array; _vertices = new osg::Vec2Array;
_vertices->setDataVariance(osg::Object::DYNAMIC); _vertices->setDataVariance(osg::Object::DYNAMIC);
// REVIEW: Memory Leak - 4,096 bytes in 1 blocks are indirectly lost
_vertices->reserve(128 * 4); _vertices->reserve(128 * 4);
_geom->setVertexArray(_vertices); _geom->setVertexArray(_vertices);
_texCoords = new osg::Vec2Array; _texCoords = new osg::Vec2Array;
_texCoords->setDataVariance(osg::Object::DYNAMIC); _texCoords->setDataVariance(osg::Object::DYNAMIC);
// REVIEW: Memory Leak - 4,096 bytes in 1 blocks are indirectly lost
_texCoords->reserve(128 * 4); _texCoords->reserve(128 * 4);
_geom->setTexCoordArray(0, _texCoords); _geom->setTexCoordArray(0, _texCoords);
osg::Vec3Array *colors = new osg::Vec3Array; osg::Vec3Array *colors = new osg::Vec3Array;