Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4942 in orxonox.OLD


Ignore:
Timestamp:
Jul 23, 2005, 1:21:20 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: garbage-collection works perfectly.
also taken out the finalized-tag from BaseObject
@patrick: i hope, you agree, that it is not used anymore, and i hope you don't mind me having ereased it.

Location:
orxonox/trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/lang/base_object.cc

    r4874 r4942  
    3434  this->className = NULL;
    3535  this->classID = CL_BASE_OBJECT;
    36   this->finalized = false;
    3736
    3837  this->objectName = NULL;
  • orxonox/trunk/src/lib/lang/base_object.h

    r4933 r4942  
    3838  void whatIs() const;
    3939
    40   /** @returns if the object is finalized */
    41   inline bool isFinalized() { return this->finalized; };
    42 
    43 
    4440 protected:
    4541  void setClassID(long classID, const char* className);
    46 
    47   /** \brief this finalizes an object and makes it ready to be garbage collected */
    48   void finalize() { this->finalized = true; };
    4942
    5043  private:
     
    5245    long               classID;          //!< this is the id from the class_id.h enumeration
    5346    char*              objectName;       //!< The name of this object
    54 
    55     bool               finalized;        //!< is true if the object is ready to be garbage collected
    5647};
    5748
  • orxonox/trunk/src/orxonox.cc

    r4885 r4942  
    9595  delete EventHandler::getInstance();
    9696
    97   ClassList::debug(3, CL_PARENT_NODE);
     97  ClassList::debug();
    9898
    9999  PRINT(3)
  • orxonox/trunk/src/subprojects/benchmark.cc

    r4554 r4942  
    176176          rdtscl(ini);
    177177
    178           bo->isFinalized();
     178//          bo->isFinalized();
    179179
    180180          rdtscl(end);
  • orxonox/trunk/src/util/garbage_collector.cc

    r4941 r4942  
    8989void GarbageCollector::collect(BaseObject* object)
    9090{
    91   printf("TEST\n");
    9291  State::getWorldEntityList()->remove(dynamic_cast<WorldEntity*>(object));
    9392  FastObjectMember* tmpC;
  • orxonox/trunk/src/world_entities/weapons/test_bullet.cc

    r4941 r4942  
    7070//      this->finalize();
    7171      GarbageCollector::getInstance()->collect(this);
     72      this->lifeCycle = 0.0;
    7273
    7374    }
Note: See TracChangeset for help on using the changeset viewer.