Ver. 2.0f
It fails at:
delete m_MotionState;
in CcdPhysicsController::~CcdPhysicsController()
Library trys to delete something that it does not create.
Imagine the situation:
class ATOM : public PHY_IMotionState
{
CcdPhysicsController *_pPhyCtrl;
}
Destructor of class ATOM executes delete _pPhyCtrl. Destructor of _pPhyCtrl executes delete m_MotionState (that is destructor of ATOM). We are entering into dead loop: ~ATOM calls ~CcdPhysicsController, ~CcdPhysicsController calls ~ATOM.
I think library should not delete objects that it does not create.
P.S. DirectX testbed is not working so far :(:(:(:(
It still fails in ~CcdPhysicsController
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
thanks for pointing it out.
There is a todo, about memory management and reference counting, I will include this too.
See http://www.continuousphysics.com/mediaw ... BulletTodo
There is a todo, about memory management and reference counting, I will include this too.
See http://www.continuousphysics.com/mediaw ... BulletTodo