BGE: Fixing a memory leak from the recent physics changes.
This commit is contained in:
parent
3150925ae8
commit
cdc5d6537f
Notes:
blender-bot
2023-02-14 10:43:41 +01:00
Referenced by issue #39984, regular error in particle placement when emitter is parented to an animated null Referenced by issue #39966, Whole Group option of dupligroup visualization of particles does not work as expected for Viewport and Blender Internal
|
@ -3200,6 +3200,8 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
|
|||
{
|
||||
delete motionstate;
|
||||
shapeInfo->Release();
|
||||
if (parent)
|
||||
parent->Release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3252,6 +3254,8 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
|
|||
shapeInfo->Release();
|
||||
// delete motionstate as it's not used
|
||||
delete motionstate;
|
||||
if (parent)
|
||||
parent->Release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -3428,4 +3432,7 @@ void CcdPhysicsEnvironment::ConvertObject(KX_GameObject *gameobj, RAS_MeshObject
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (parent)
|
||||
parent->Release();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue