mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-17 11:43:25 +00:00
fix a leak: physics heightfield was only destroyed on cell change and not on exit
This commit is contained in:
parent
ff84fbbfa7
commit
e498495589
@ -222,6 +222,14 @@ namespace Physic
|
||||
PhysicEngine::~PhysicEngine()
|
||||
{
|
||||
|
||||
HeightFieldContainer::iterator hf_it = mHeightFieldMap.begin();
|
||||
for (; hf_it != mHeightFieldMap.end(); ++hf_it)
|
||||
{
|
||||
dynamicsWorld->removeRigidBody(hf_it->second.mBody);
|
||||
delete hf_it->second.mShape;
|
||||
delete hf_it->second.mBody;
|
||||
}
|
||||
|
||||
RigidBodyContainer::iterator rb_it = RigidBodyMap.begin();
|
||||
for (; rb_it != RigidBodyMap.end(); ++rb_it)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user