Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2009, 10:25:03 PM (15 years ago)
Author:
landauf
Message:

replaced delete with destroy() in orxonox

Location:
code/branches/core5/src/orxonox/worldentities
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/worldentities/BigExplosion.cc

    r5791 r5801  
    226226            {
    227227                this->debris1_->detachOgreObject(this->debrisFire1_->getParticleSystem());
    228                 delete this->debrisFire1_;
     228                this->debrisFire1_->destroy();
    229229            }
    230230            if (this->debrisSmoke1_)
    231231            {
    232232                this->debris1_->detachOgreObject(this->debrisSmoke1_->getParticleSystem());
    233                 delete this->debrisSmoke1_;
     233                this->debrisSmoke1_->destroy();
    234234            }
    235235
     
    237237            {
    238238                this->debris2_->detachOgreObject(this->debrisFire2_->getParticleSystem());
    239                 delete this->debrisFire2_;
     239                this->debrisFire2_->destroy();
    240240            }
    241241            if (this->debrisSmoke2_)
    242242            {
    243243                this->debris2_->detachOgreObject(this->debrisSmoke2_->getParticleSystem());
    244                 delete this->debrisSmoke2_;
     244                this->debrisSmoke2_->destroy();
    245245            }
    246246
     
    248248            {
    249249                this->debris3_->detachOgreObject(this->debrisFire3_->getParticleSystem());
    250                 delete this->debrisFire3_;
     250                this->debrisFire3_->destroy();
    251251            }
    252252            if (this->debrisSmoke3_)
    253253            {
    254254                this->debris3_->detachOgreObject(this->debrisSmoke3_->getParticleSystem());
    255                 delete this->debrisSmoke3_;
     255                this->debrisSmoke3_->destroy();
    256256            }
    257257
     
    259259            {
    260260                this->debris4_->detachOgreObject(this->debrisFire4_->getParticleSystem());
    261                 delete this->debrisFire4_;
     261                this->debrisFire4_->destroy();
    262262            }
    263263            if (this->debrisSmoke4_)
    264264            {
    265265                this->debris4_->detachOgreObject(this->debrisSmoke4_->getParticleSystem());
    266                 delete this->debrisSmoke4_;
     266                this->debrisSmoke4_->destroy();
    267267            }
    268268        }
  • code/branches/core5/src/orxonox/worldentities/ControllableEntity.cc

    r5738 r5801  
    9696
    9797            if (this->xmlcontroller_)
    98                 delete this->xmlcontroller_;
     98                this->xmlcontroller_->destroy();
    9999
    100100            if (this->hud_)
    101                 delete this->hud_;
     101                this->hud_->destroy();
    102102
    103103            if (this->camera_)
    104                 delete this->camera_;
     104                this->camera_->destroy();
    105105
    106106            for (std::list<CameraPosition*>::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)
    107                 delete (*it);
     107                (*it)->destroy();
    108108
    109109            if (this->getScene()->getSceneManager())
     
    259259
    260260        if (this->bDestroyWhenPlayerLeft_)
    261             delete this;
     261            this->destroy();
    262262    }
    263263
     
    303303        {
    304304            this->camera_->detachFromParent();
    305             delete this->camera_;
     305            this->camera_->destroy();
    306306            this->camera_ = 0;
    307307        }
     
    309309        if (this->hud_)
    310310        {
    311             delete this->hud_;
     311            this->hud_->destroy();
    312312            this->hud_ = 0;
    313313        }
  • code/branches/core5/src/orxonox/worldentities/ExplosionChunk.cc

    r5791 r5801  
    9292            {
    9393                this->detachOgreObject(this->fire_->getParticleSystem());
    94                 delete this->fire_;
     94                this->fire_->destroy();
    9595            }
    9696            if (this->smoke_)
    9797            {
    9898                this->detachOgreObject(this->smoke_->getParticleSystem());
    99                 delete this->smoke_;
     99                this->smoke_->destroy();
    100100            }
    101101        }
  • code/branches/core5/src/orxonox/worldentities/MovableEntity.cc

    r5738 r5801  
    6161        if (this->isInitialized())
    6262            if (this->continuousResynchroTimer_)
    63                 delete this->continuousResynchroTimer_;
     63                this->continuousResynchroTimer_->destroy();
    6464    }
    6565
  • code/branches/core5/src/orxonox/worldentities/WorldEntity.cc

    r5738 r5801  
    119119            {
    120120                if ((*it)->getDeleteWithParent())
    121                     delete (*(it++));
     121                    (*(it++))->destroy();
    122122                else
    123123                {
     
    132132                delete this->physicalBody_;
    133133            }
    134             delete this->collisionShape_;
     134            this->collisionShape_->destroy();
    135135
    136136            this->node_->detachAllObjects();
  • code/branches/core5/src/orxonox/worldentities/pawns/Pawn.cc

    r5738 r5801  
    9797
    9898            if (this->weaponSystem_)
    99                 delete this->weaponSystem_;
     99                this->weaponSystem_->destroy();
    100100        }
    101101    }
  • code/branches/core5/src/orxonox/worldentities/pawns/SpaceShip.cc

    r5738 r5801  
    7575    {
    7676        if (this->isInitialized() && this->engine_)
    77             delete this->engine_;
     77            this->engine_->destroy();
    7878    }
    7979
     
    207207                    else
    208208                    {
    209                         delete object;
     209                        object->destroy();
    210210                    }
    211211                }
Note: See TracChangeset for help on using the changeset viewer.