Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8407 for code/trunk/src


Ignore:
Timestamp:
May 5, 2011, 11:14:59 PM (14 years ago)
Author:
scheusso
Message:

fixing a (quite huge) network memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/network/GamestateManager.cc

    r8394 r8407  
    228228//       packet::Gamestate* gs = new packet::Gamestate(*gamestate);
    229229//     packet::Gamestate* gs = gamestate;
    230     packet::Gamestate *gs = new packet::Gamestate(*gamestate); //TODO: is this neccessary ?
     230    packet::Gamestate *gs = new packet::Gamestate(*gamestate); //this is neccessary because the gamestate are being kept (to diff them later on) for each client seperately
    231231//     packet::Gamestate *gs = new packet::Gamestate();
    232232//     gs->collectData( id_, 0x1 );
     
    289289
    290290//    assert(curid==GAMESTATEID_INITIAL || curid<=gamestateID); // this line is commented out because acknowledgements are unreliable and may arrive in distorted order
    291     if( gamestateID <= curid )
     291    if( gamestateID <= curid && curid != GAMESTATEID_INITIAL )
    292292        return true;
    293293COUT(4) << "acking gamestate " << gamestateID << " for peerID: " << peerID << " curid: " << curid << std::endl;
Note: See TracChangeset for help on using the changeset viewer.