summaryrefslogtreecommitdiff
path: root/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/SharedMemory/PhysicsServerCommandProcessor.cpp')
-rw-r--r--examples/SharedMemory/PhysicsServerCommandProcessor.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
index d3f1ee799..8275451ed 100644
--- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
+++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp
@@ -240,6 +240,10 @@ struct InternalVisualShapeData
b3AlignedObjectArray<std::string> m_pathPrefixes;
+ virtual ~InternalVisualShapeData()
+ {
+ clear();
+ }
void clear()
{
m_tinyRendererVisualShapeIndex = -1;
@@ -259,8 +263,14 @@ struct InternalCollisionShapeData
m_used(0)
{
}
+
+ virtual ~InternalCollisionShapeData()
+ {
+ clear();
+ }
void clear()
{
+ m_urdfCollisionObjects.clear();
m_collisionShape = 0;
m_used = 0;
}
@@ -15949,6 +15959,9 @@ void PhysicsServerCommandProcessor::resetSimulation(int flags)
m_data->m_bodyHandles.exitHandles();
m_data->m_bodyHandles.initHandles();
+ m_data->m_userVisualShapeHandles.exitHandles();
+ m_data->m_userVisualShapeHandles.initHandles();
+
m_data->m_userCollisionShapeHandles.exitHandles();
m_data->m_userCollisionShapeHandles.initHandles();