]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/tgdb/SGBuildingBin.cxx
Fix a memory leak in random buildings.
[simgear.git] / simgear / scene / tgdb / SGBuildingBin.cxx
index fb3b82d996d1759553267b96ccb150236778ddaf..3000079e52f577a62e4c60ae509a8e4149a1fde7 100644 (file)
@@ -79,10 +79,10 @@ void addBuildingToLeafGeode(Geode* geode, const SGBuildingBin::Building& buildin
       
       // Get or create geometry.
       osg::ref_ptr<osg::Geometry> geom;
-      osg::Vec3Array* v = new osg::Vec3Array;
-      osg::Vec2Array* t = new osg::Vec2Array;
-      osg::Vec4Array* c = new osg::Vec4Array; // single value
-      osg::Vec3Array* n = new osg::Vec3Array;            
+      osg::Vec3Array* v;
+      osg::Vec2Array* t;
+      osg::Vec4Array* c;
+      osg::Vec3Array* n;
       
       if (geode->getNumDrawables() == 0) {
         geom = new osg::Geometry;