Changeset 3669 in orxonox.OLD for orxonox/trunk/src/garbage_collector.cc
- Timestamp:
- Mar 30, 2005, 12:06:36 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/garbage_collector.cc
r3668 r3669 116 116 return; 117 117 /* 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; 119 122 WorldInterface* wi = WorldInterface::getInstance(); 120 123 tList<WorldEntity>* list = wi->getEntityList(); … … 126 129 if( entity->isFinalized()) 127 130 { 128 PRINTF(1)("Finalizing object in list - not yet done realy\n"); 131 PRINTF(4)("= finalizing object\n"); 132 ++counter; 129 133 130 134 /* first remove out of entity list */ 131 135 list->remove(entity); 132 136 /* second remove out of pnode tree */ 133 //entity->remove();134 //delete entity;137 entity->remove(); 138 delete entity; 135 139 } 136 140 entity = iterator->nextElement(); 137 141 } 142 PRINTF(3)("= collected %i unused objects\n", counter); 143 PRINTF(3)("=============================\n"); 138 144 145 146 147 139 148 /* reset time to count again up to this->delay */ 140 149 this->time = 0;
Note: See TracChangeset
for help on using the changeset viewer.