Changeset 4289 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- May 26, 2005, 12:49:50 AM (20 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/garbage_collector.cc
r4262 r4289 25 25 26 26 #include "list.h" 27 #include "object_manager.h" 27 28 28 29 using namespace std; … … 137 138 entity->remove(); 138 139 /* then finaly delete reference */ 139 delete entity; 140 //delete entity; 141 ObjectManager::getInstance()->addToDeadList(CL_TEST_BULLET, entity); 142 ObjectManager::getInstance()->debug(); 140 143 } 141 144 entity = iterator->nextElement(); -
orxonox/trunk/src/util/object_manager.cc
r4288 r4289 78 78 this->managedObjectList[index]->add(object); 79 79 else 80 PRINTF(0)(" Error: unable to add object to the list nr. %i ,ignoring\n", index);80 PRINTF(0)(" Error: unable to add object to the list nr. %i: no list initialized - ignoring\n", index); 81 81 } 82 82 83 83 84 84 BaseObject* ObjectManager::getFromDeadList(classList index, int number) 85 {} 85 { 86 if( likely(this->managedObjectList[index] != NULL)) 87 { 88 BaseObject* obj = this->managedObjectList[index]->firstElement(); 89 this->managedObjectList[index]->remove(obj); 90 return obj; 91 } 92 else 93 PRINTF(0)(" Error: unable to get object from the list nr. %i: no elements initialized - ignoring\n", index); 94 } 86 95 87 96
Note: See TracChangeset
for help on using the changeset viewer.