Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3531 in orxonox.OLD for orxonox/trunk/src/lib/lang


Ignore:
Timestamp:
Mar 13, 2005, 10:50:43 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: all WorldEntities/PWodes now destroy all date they alocate.

this is done with a virtual destructor:
if PNode is deleted it calls for the delete of the virtual destructor, and deletes the data of it.

Location:
orxonox/trunk/src/lib/lang
Files:
2 edited

Legend:

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

    r3484 r3531  
    2626   \brief standard constructor
    2727*/
    28 BaseObject::BaseObject () {}
     28BaseObject::BaseObject ()
     29{
     30  this->className = NULL;
     31}
    2932
    3033
     
    3235   \brief standard deconstructor
    3336*/
    34 BaseObject::~BaseObject () {}
     37BaseObject::~BaseObject ()
     38{
     39  this->destroy();
     40}
    3541
     42/**
     43    \brief destorys everything BaseObject allocated
     44*/
     45void BaseObject::destroy(void)
     46{
     47  //  delete []this->className;
     48}
    3649
    3750void BaseObject::setClassName (char* className)
  • orxonox/trunk/src/lib/lang/base_object.h

    r3484 r3531  
    1515 public:
    1616  BaseObject ();
    17   ~BaseObject ();
     17  virtual ~BaseObject ();
     18
     19  void destroy(void);
    1820
    1921  void setClassName (char* className);
Note: See TracChangeset for help on using the changeset viewer.