Fixed memory leaks due to missing destructor.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4405 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -28,6 +28,15 @@ TrackObjectManager::TrackObjectManager()
|
||||
{
|
||||
} // TrackObjectManager
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
TrackObjectManager::~TrackObjectManager()
|
||||
{
|
||||
for(unsigned int i=0; i<m_all_objects.size(); i++)
|
||||
{
|
||||
delete m_all_objects[i];
|
||||
}
|
||||
} // ~TrackObjectManager
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
/** Adds an object to the track object manager. The type to add is specified
|
||||
* in the xml_node.
|
||||
|
||||
@@ -38,6 +38,7 @@ public:
|
||||
std::vector<TrackObject*> m_all_objects;
|
||||
public:
|
||||
TrackObjectManager();
|
||||
~TrackObjectManager();
|
||||
void add(const XMLNode &xml_node, const Track &track);
|
||||
void update(float dt);
|
||||
void handleExplosion(const Vec3 &pos, const PhysicalObject *mp) const;
|
||||
|
||||
Reference in New Issue
Block a user