Try to fix a leak
parent
a31c979abc
commit
952f0a53c9
|
@ -897,7 +897,8 @@ void X3DImporter::readSphere(XmlNode &node) {
|
|||
StandardShapes::MakeSphere(tess, tlist);
|
||||
// copy data from temp array and apply scale
|
||||
for (std::vector<aiVector3D>::iterator it = tlist.begin(); it != tlist.end(); ++it) {
|
||||
((X3DNodeElementGeometry3D *)ne)->Vertices.push_back(*it * radius);
|
||||
aiVector3D v = *it;
|
||||
((X3DNodeElementGeometry3D *)ne)->Vertices.emplace_back(v * radius);
|
||||
}
|
||||
|
||||
((X3DNodeElementGeometry3D *)ne)->Solid = solid;
|
||||
|
|
|
@ -108,6 +108,10 @@ struct X3DNodeElementBase {
|
|||
std::list<X3DNodeElementBase *> Children;
|
||||
X3DElemType Type;
|
||||
|
||||
virtual ~X3DNodeElementBase() {
|
||||
// empty
|
||||
}
|
||||
|
||||
protected:
|
||||
X3DNodeElementBase(X3DElemType type, X3DNodeElementBase *pParent) :
|
||||
Parent(pParent), Type(type) {
|
||||
|
|
Loading…
Reference in New Issue