From 61dc19f635330f35bda80537c17d8db4b8a8cf49 Mon Sep 17 00:00:00 2001 From: Automatic Release Builder Date: Sun, 6 Sep 2020 15:23:21 +0100 Subject: [PATCH] Fix for SGTexturedTriangleBin leaks Adapted from next commit 0d5552851bdaee02aa32d6a82d63c8d399a033be --- simgear/scene/tgdb/SGTexturedTriangleBin.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx index 8f5cc314..b39ead0a 100644 --- a/simgear/scene/tgdb/SGTexturedTriangleBin.hxx +++ b/simgear/scene/tgdb/SGTexturedTriangleBin.hxx @@ -428,12 +428,12 @@ public: return 0; // FIXME: do not include all values here ... - osg::Vec3Array* vertices = new osg::Vec3Array; - osg::Vec3Array* normals = new osg::Vec3Array; - osg::Vec2Array* priTexCoords = new osg::Vec2Array; - osg::Vec2Array* secTexCoords = new osg::Vec2Array; + osg::ref_ptr vertices = new osg::Vec3Array; + osg::ref_ptr normals = new osg::Vec3Array; + osg::ref_ptr priTexCoords = new osg::Vec2Array; + osg::ref_ptr secTexCoords = new osg::Vec2Array; - osg::Vec4Array* colors = new osg::Vec4Array; + osg::ref_ptr colors = new osg::Vec4Array; colors->push_back(osg::Vec4(1, 1, 1, 1)); osg::Geometry* geometry = new osg::Geometry;