Changeset 4979 in orxonox.OLD for orxonox/trunk/src/util
- Timestamp:
- Aug 10, 2005, 4:47:23 PM (19 years ago)
- Location:
- orxonox/trunk/src/util
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/util/fast_factory.cc
r4951 r4979 81 81 } 82 82 83 84 83 /** 85 84 * searches for a FastFactory … … 135 134 while (tmpFac != NULL) 136 135 { 136 printf("DELETEING ALL OF %s\n",tmpFac->getName()); 137 137 tmpFac->flush(hardFLUSH); 138 138 tmpFac = tmpFac->next; … … 140 140 } 141 141 142 143 142 /** 144 143 * ereases all the remaining containers, without deleting the stored Objects inside of them. … … 152 151 delMember = tmpMember; 153 152 tmpMember = tmpMember->next; 154 if (unlikely(hardFLUSH == true)) 153 if (hardFLUSH) 154 { 155 PRINTF(1)("COOL\n"); 155 156 delete delMember->objectPointer; 157 } 156 158 delete delMember; 157 159 } … … 267 269 tmpFac = tmpFac->next; 268 270 } 269 270 } 271 } 271 } 272 } -
orxonox/trunk/src/util/fast_factory.h
r4969 r4979 15 15 * afterwards one can just retrieve an Object form the Class with 16 16 * this->bulletFactory->resurrect(); // this returns a BaseObject an Object of the class. 17 * 18 * The big difference to the FastFactory-class is, that this one is used more for the purpose 19 * of fast game-interaction than for loading. althought one can also load FastFactorized classes 20 * it is not the main topic. 17 21 */ 18 19 22 20 23 #ifndef _FAST_FACTORY_H -
orxonox/trunk/src/util/garbage_collector.cc
r4975 r4979 25 25 26 26 using namespace std; 27 28 27 29 28 GarbageCollector* GarbageCollector::singletonRef = 0; … … 119 118 void GarbageCollector::update() 120 119 { 121 if (this->time < this->delay) 122 { 123 return; 124 } 125 if (this->collectedObjects == NULL) 120 if (this->time < this->delay || this->collectedObjects == NULL) 126 121 return; 127 122 else … … 131 126 while (tmpC != NULL) 132 127 { 133 WorldEntity* entity = dynamic_cast<WorldEntity*>(tmpC->objectPointer);128 //WorldEntity* entity = dynamic_cast<WorldEntity*>(tmpC->objectPointer); 134 129 //State::getWorldEntityList()->remove(entity); 135 entity->remove();136 FastFactory::kill( entity, true);130 //entity->remove(); 131 FastFactory::kill(tmpC->objectPointer, true); 137 132 138 133 moveC = tmpC->next; -
orxonox/trunk/src/util/garbage_collector.h
r4941 r4979 1 1 /*! 2 2 * @file garbage_collector.h 3 * Definition of the proto class template, used quickly start work4 * @todo Example: this shows how to use simply add a Marker that here has to be done something.5 *6 * The Protoclass exists, to help you quikly getting the run for how to develop in orxonox.7 * It is an example for the CODING-CONVENTION, and a starting-point for every class.8 3 */ 9 4 … … 17 12 //! this class maintains the garbage collection. 18 13 /** 19 the class is been ticked by the world.cc and goes through the 20 world_entity list to clean out all unused entities. 14 * you can pass everything to this class that you want to be collected 15 * just use GarbageCollector->collect(POINTER); to pass a collectable to the GarbageCollector 16 * it will then be handled acording to the class 21 17 */ 22 18 class GarbageCollector : public BaseObject {
Note: See TracChangeset
for help on using the changeset viewer.