Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4519 in orxonox.OLD for orxonox/trunk/src/util/garbage_collector.h


Ignore:
Timestamp:
Jun 6, 2005, 2:36:04 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: changed all getInstances into inline functions to save some (minor) time

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/util/garbage_collector.h

    r4485 r4519  
    2222
    2323 public:
    24   GarbageCollector();
    2524  virtual ~GarbageCollector();
    26   static GarbageCollector* getInstance();
     25  /** \returns a Pointer to the only object of this Class */
     26  inline static GarbageCollector* getInstance(void) { if (!singletonRef) singletonRef = new GarbageCollector();  return singletonRef; };
    2727
    2828  void setCollectionDelay(float delay);
     
    3434
    3535 private:
     36  GarbageCollector();
     37
     38 private:
    3639  static GarbageCollector*    singletonRef;           //!< The reference to this class (singleton)
    3740  float                       delay;                  //!< this is the delay to wait until collection
Note: See TracChangeset for help on using the changeset viewer.