Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2552


Ignore:
Timestamp:
Dec 30, 2008, 5:43:17 PM (15 years ago)
Author:
scheusso
Message:

found a memory leak

File:
1 edited

Legend:

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

    r2485 r2552  
    136136    //why are we searching the same client's gamestate id as we searched in
    137137    //Server::sendGameState?
    138     packet::Gamestate *gs;
     138    packet::Gamestate *gs, *tempgs;
    139139    unsigned int gID = ClientInformation::findClient(clientID)->getGamestateID();
    140140    if(!reference)
     
    156156    if(client){
    157157//       COUT(3) << "diffing" << std::endl;
    158       gs = gs->diff(client);
     158      tempgs = gs->diff(client);
     159      delete gs;
     160      gs = tempgs;
    159161    }
    160162    else{
    161163//       COUT(3) << "not diffing" << std::endl;
    162       gs = new packet::Gamestate(*gs);
     164//       gs = new packet::Gamestate(*gs); //not necessary
    163165    }
    164166    bool b = gs->compressData();
Note: See TracChangeset for help on using the changeset viewer.