fix potential memory leaks
This commit is contained in:
@@ -64,8 +64,10 @@ bool b3ImportMeshUtility::loadAndRegisterMeshFromFileInternal(const std::string&
|
|||||||
meshData.m_textureHeight = height;
|
meshData.m_textureHeight = height;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
b3Warning("Unsupported texture image format [%s]\n",relativeFileName);
|
||||||
meshData.m_textureWidth = 0;
|
meshData.m_textureWidth = 0;
|
||||||
meshData.m_textureHeight = 0;
|
meshData.m_textureHeight = 0;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else
|
} else
|
||||||
|
|||||||
@@ -1243,6 +1243,14 @@ btCollisionShape* BulletURDFImporter::getAllocatedCollisionShape(int index)
|
|||||||
const UrdfCollision& col = link->m_collisionArray[v];
|
const UrdfCollision& col = link->m_collisionArray[v];
|
||||||
btCollisionShape* childShape = convertURDFToCollisionShape(&col ,pathPrefix);
|
btCollisionShape* childShape = convertURDFToCollisionShape(&col ,pathPrefix);
|
||||||
m_data->m_allocatedCollisionShapes.push_back(childShape);
|
m_data->m_allocatedCollisionShapes.push_back(childShape);
|
||||||
|
if (childShape->getShapeType()==COMPOUND_SHAPE_PROXYTYPE)
|
||||||
|
{
|
||||||
|
btCompoundShape* compound = (btCompoundShape*) childShape;
|
||||||
|
for (int i=0;i<compound->getNumChildShapes();i++)
|
||||||
|
{
|
||||||
|
m_data->m_allocatedCollisionShapes.push_back(compound->getChildShape(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (childShape)
|
if (childShape)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -723,6 +723,11 @@ public:
|
|||||||
virtual ~MultiThreadedOpenGLGuiHelper()
|
virtual ~MultiThreadedOpenGLGuiHelper()
|
||||||
{
|
{
|
||||||
//delete m_childGuiHelper;
|
//delete m_childGuiHelper;
|
||||||
|
if (m_debugDraw)
|
||||||
|
{
|
||||||
|
delete m_debugDraw;
|
||||||
|
m_debugDraw = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void setCriticalSection(b3CriticalSection* cs)
|
void setCriticalSection(b3CriticalSection* cs)
|
||||||
|
|||||||
Reference in New Issue
Block a user