Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4939 in orxonox.OLD for orxonox/trunk/src/util/object_manager.cc


Ignore:
Timestamp:
Jul 23, 2005, 12:15:03 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now the garbage collector should be ready to store the Objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/object_manager.cc

    r4938 r4939  
    211211 * kills Object object, meaning, that it will be stored in the deadList of the FastFactory, and waiting for resurrection
    212212 * @param object the Object to kill.
     213 *
     214 * synony that would be really grate would be abolish, but this is more like exterminate than pause-mode.
    213215 */
    214216void FastFactory::kill(BaseObject* object)
     
    231233
    232234
    233 void FastFactory::kill(BaseObject* object, ClassID classID)
    234 {
    235 
    236 
     235void FastFactory::kill(BaseObject* object, bool searchForFastFactory)
     236{
     237  if (likely(searchForFastFactory == true))
     238  {
     239    FastFactory* tmpFac = FastFactory::first;
     240    while (tmpFac != NULL)
     241    {
     242      if (object->isA(tmpFac->storedClassID))
     243      {
     244        tmpFac->kill(object);
     245        return;
     246      }
     247      tmpFac = tmpFac->next;
     248    }
     249
     250  }
    237251}
    238252
Note: See TracChangeset for help on using the changeset viewer.