Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2556


Ignore:
Timestamp:
Dec 31, 2008, 9:23:28 AM (15 years ago)
Author:
scheusso
Message:

found another memory leak (hope this was the last one in the network part)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/network/GamestateManager.cc

    r2552 r2556  
    5555namespace orxonox
    5656{
    57   GamestateManager::GamestateManager() {
    58     id_=0;
     57  GamestateManager::GamestateManager() :
     58  reference(0), id_(0)
     59  {
    5960    trafficControl_ = new TrafficControl();
    6061  }
    6162
    62   GamestateManager::~GamestateManager() {
     63  GamestateManager::~GamestateManager()
     64  {
    6365    delete trafficControl_;
    6466  }
     
    9799
    98100  bool GamestateManager::getSnapshot(){
     101    if ( reference != 0 )
     102      delete reference;
    99103    reference = new packet::Gamestate();
    100104    if(!reference->collectData(++id_)){ //we have no data to send
Note: See TracChangeset for help on using the changeset viewer.