Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3669 in orxonox.OLD for orxonox/trunk/src/garbage_collector.cc


Ignore:
Timestamp:
Mar 30, 2005, 12:06:36 PM (20 years ago)
Author:
patrick
Message:

orxonox/trunk: now garbage collection is working correctlymake

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/garbage_collector.cc

    r3668 r3669  
    116116    return;
    117117  /* garbage collect */
    118   PRINTF(3)("GarbageCollection is been done\n");
     118  PRINTF(3)("=============================\n");
     119  PRINTF(3)("Processing Garbage Collection\n");
     120  PRINTF(3)("=============================\n");
     121  int counter = 0;
    119122  WorldInterface* wi = WorldInterface::getInstance();
    120123  tList<WorldEntity>* list = wi->getEntityList();
     
    126129      if( entity->isFinalized())
    127130        {
    128           PRINTF(1)("Finalizing object in list - not yet done realy\n");
     131          PRINTF(4)("= finalizing object\n");
     132          ++counter;
    129133         
    130134          /* first remove out of entity list */
    131135          list->remove(entity);
    132136          /* second remove out of pnode tree */
    133           //entity->remove();
    134           //delete entity;
     137          entity->remove();
     138          delete entity;
    135139        }
    136140      entity = iterator->nextElement();
    137141    }
     142  PRINTF(3)("= collected %i unused objects\n", counter);
     143  PRINTF(3)("=============================\n");
    138144 
     145 
     146
     147
    139148  /* reset time to count again up to this->delay */
    140149  this->time = 0;
Note: See TracChangeset for help on using the changeset viewer.