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:
hikerstk
2010-01-07 01:14:46 +00:00
parent 6f1a199e7d
commit 81bb0ac8dc
2 changed files with 10 additions and 0 deletions

View File

@@ -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.

View File

@@ -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;