Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3544 in orxonox.OLD for orxonox/trunk/src/lib


Ignore:
Timestamp:
Mar 14, 2005, 10:54:00 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now the delete-process is as inteded by c++
virtual ~ClassName extends deletion and deletes also the MasterClass

Location:
orxonox/trunk/src/lib
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/coord/helper_parent.cc

    r3533 r3544  
    4141HelperParent::~HelperParent ()
    4242{
    43   this->destroy();
     43
    4444}
    45 
    46 
    47 /**
    48    \brief destroys all allocated memory
    49 */
    50 void HelperParent::destroy(void)
    51 {
    52 
    53 
    54   static_cast<PNode*>(this)->destroy();
    55 }
  • orxonox/trunk/src/lib/coord/helper_parent.h

    r3533 r3544  
    1818  HelperParent ();
    1919  virtual ~HelperParent ();
    20   void destroy(void);
    2120
    2221};
  • orxonox/trunk/src/lib/coord/null_parent.cc

    r3543 r3544  
    6161NullParent::~NullParent ()
    6262{
    63   this->destroy();
    64 }
    65 
    66 /**
    67    \brief destroys all allocated memory
    68 */
    69 void NullParent::destroy(void)
    70 {
    7163  //delete singletonRef;
    7264  singletonRef = NULL;
    73 
    74   static_cast<PNode*>(this)->destroy();
    7565}
    76 
    77 
    7866
    7967/**
  • orxonox/trunk/src/lib/coord/null_parent.h

    r3533 r3544  
    1717  static NullParent* getInstance ();
    1818  virtual ~NullParent ();
    19   void destroy(void);
    20  
    2119
    2220  static NullParent* singletonRef;
  • orxonox/trunk/src/lib/coord/p_node.cc

    r3543 r3544  
    113113  /* there is currently a problem with cleaning up - fix*/
    114114
    115   this->destroy();
     115  PNode* pn = this->children->enumerate();
     116  while( pn != NULL)
     117    {
     118      pn = this->children->nextElement();
     119      delete pn;
     120    }
     121  /* this deletes all children in the list */
     122  delete this->children;
     123
    116124}
    117125
     
    122130   cleans up all pnodes
    123131*/
     132/*
    124133void PNode::destroy ()
    125134{
     
    130139      pn = this->children->nextElement();
    131140    }
    132   /* this deletes all children in the list */
     141  // this deletes all children in the list
    133142  this->children->destroy ();
    134143
    135144  static_cast<BaseObject*>(this)->destroy();
    136145}
    137 
     146*/
    138147
    139148/**
  • orxonox/trunk/src/lib/coord/p_node.h

    r3543 r3544  
    4141  PNode (Vector* absCoordinate, PNode* pNode);
    4242  virtual ~PNode ();
    43 
    44   void destroy ();
    4543
    4644  PNode* parent;            //!< a pointer to the parent node
  • orxonox/trunk/src/lib/lang/base_object.cc

    r3531 r3544  
    3737BaseObject::~BaseObject ()
    3838{
    39   this->destroy();
    40 }
    4139
    42 /**
    43     \brief destorys everything BaseObject allocated
    44 */
    45 void BaseObject::destroy(void)
    46 {
    47   //  delete []this->className;
    4840}
    4941
  • orxonox/trunk/src/lib/lang/base_object.h

    r3531 r3544  
    1717  virtual ~BaseObject ();
    1818
    19   void destroy(void);
    20 
    2119  void setClassName (char* className);
    2220  char* getClassName(void) const;
Note: See TracChangeset for help on using the changeset viewer.