From 0b4ceb8c2b86e7ecfcf9ff91a807bfdead8f717f Mon Sep 17 00:00:00 2001 From: hikerstk Date: Tue, 29 Apr 2008 03:50:08 +0000 Subject: [PATCH] Removed minor memory leak. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1775 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/kart.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kart.cpp b/src/kart.cpp index 356a1e129..d8ec18d1d 100644 --- a/src/kart.cpp +++ b/src/kart.cpp @@ -200,9 +200,9 @@ void Kart::createPhysics(ssgEntity *obj) wheel.m_rollInfluence = m_kart_properties->getRollInfluence(); } // Obviously these allocs have to be properly managed/freed - btTransform *t=new btTransform(); - t->setIdentity(); - m_uprightConstraint=new btUprightConstraint(*m_body, *t); + btTransform t; + t.setIdentity(); + m_uprightConstraint=new btUprightConstraint(*m_body, t); m_uprightConstraint->setLimit(m_kart_properties->getUprightTolerance()); m_uprightConstraint->setBounce(0.0f); m_uprightConstraint->setMaxLimitForce(m_kart_properties->getUprightMaxForce());