Changeset 3664 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 30, 2005, 12:11:23 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/garbage_collector.cc
r3662 r3664 65 65 66 66 67 /** 68 \brief this sets the collection delay 69 \param delay 70 71 after this delay, the garbage collector starts its work and begins to collect unused object 72 to delete them afterwards. only objects in the worldentity list from the world object are lookded 73 at. 74 */ 67 75 void GarbageCollector::setCollectionDelay(float delay) 68 {} 76 { 77 this->delay = delay; 78 } 69 79 70 80 81 /** 82 \brief this foreces a garbage collection 83 84 if this function is called, the gc tries to initiate the garbage collection routines. actually 85 this should always work. 86 */ 71 87 void GarbageCollector::forceCollection() 72 88 { 73 89 /* just make the time slitely bigger than the delay */ 90 this->time = this->delay + 1; 91 /* and update, to get rid of the unused objects */ 92 this->update(); 74 93 } 75 94 95 96 /** 97 \brief this ticks the GarbageCollector to give it the time pulse 98 \param the time passed since last tick 99 100 like every other tick function eg. worldentity 101 */ 76 102 void GarbageCollector::tick(float time) 77 103 { … … 80 106 81 107 108 /** 109 \brief this updated the gargabe collection, if the time is ready 110 111 112 */ 82 113 void GarbageCollector::update() 83 114 { … … 101 132 /* second remove out of pnode tree */ 102 133 entity->remove(); 103 //NullParent* np = NullParent::getInstance();104 //np->removeChild(np);105 106 134 } 107 135 entity = iterator->nextElement();
Note: See TracChangeset
for help on using the changeset viewer.