Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5800 for code/branches/core5


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

replaced delete with destroy() in modules

Location:
code/branches/core5/src/modules
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/objects/eventsystem/EventDispatcher.cc

    r5738 r5800  
    4747        if (this->isInitialized())
    4848            for (std::list<EventTarget*>::iterator it = this->targets_.begin(); it != this->targets_.end(); ++it)
    49                 delete (*it);
     49                (*it)->destroy();
    5050    }
    5151
  • code/branches/core5/src/modules/overlays/hud/HUDHealthBar.cc

    r5738 r5800  
    5656    {
    5757        if (this->isInitialized())
    58             delete this->textoverlay_;
     58            this->textoverlay_->destroy();
    5959    }
    6060
  • code/branches/core5/src/modules/overlays/hud/UnderAttackHealthBar.cc

    r5738 r5800  
    5858    {
    5959        if (this->isInitialized())
    60             delete this->text_;
     60            this->text_->destroy();
    6161    }
    6262
  • code/branches/core5/src/modules/overlays/stats/CreateLines.cc

    r5738 r5800  
    5959    CreateLines::~CreateLines()
    6060    {
    61         delete this->playerNameText_;
    62         delete this->scoreText_;
    63         delete this->deathsText_;
    64         delete this->background_;
     61        this->playerNameText_->destroy();
     62        this->scoreText_->destroy();
     63        this->deathsText_->destroy();
     64        this->background_->destroy();
    6565    }
    6666
  • code/branches/core5/src/modules/pong/Pong.cc

    r5738 r5800  
    120120        if (this->ball_)
    121121        {
    122             delete this->ball_;
     122            this->ball_->destroy();
    123123            this->ball_ = 0;
    124124        }
  • code/branches/core5/src/modules/pong/PongAI.cc

    r5738 r5800  
    6161    {
    6262        for (std::list<std::pair<Timer<PongAI>*, char> >::iterator it = this->reactionTimers_.begin(); it != this->reactionTimers_.end(); ++it)
    63             delete (*it).first;
     63            (*it).first->destroy();
    6464    }
    6565
     
    247247        // Destroy the timer and remove it from the list
    248248        Timer<PongAI>* timer = this->reactionTimers_.front().first;
    249         delete timer;
     249        timer->destroy();
    250250
    251251        this->reactionTimers_.pop_front();
  • code/branches/core5/src/modules/questsystem/QuestGUI.cc

    r5748 r5800  
    7979       
    8080        if(this->root_ != NULL)
    81             delete this->root_;
     81            this->root_->destroy();
    8282    }
    8383
     
    146146            COUT(3) << "Clearing Node '" << *str << "' ..." << std::endl;
    147147            delete str;
    148             delete node;
     148            node->destroy();
    149149        }
    150150        this->nodes_.clear();
  • code/branches/core5/src/modules/questsystem/QuestManager.cc

    r5755 r5800  
    7676        for(std::map<PlayerInfo*, QuestGUI*>::iterator it = this->questGUIs_.begin(); it != this->questGUIs_.end(); it++)
    7777        {
    78             delete (*it).second;
     78            (*it).second->destroy();
    7979        }
    8080        this->questGUIs_.clear();
  • code/branches/core5/src/modules/questsystem/notifications/NotificationQueue.cc

    r5748 r5800  
    426426        this->containers_.erase(container);
    427427        this->overlays_.erase(container->notification);
    428         delete container->overlay;
     428        container->overlay->destroy();
    429429        delete container;
    430430        this->size_= this->size_-1;
  • code/branches/core5/src/modules/weapons/projectiles/ParticleProjectile.cc

    r5738 r5800  
    5959        {
    6060            this->detachOgreObject(this->particles_->getParticleSystem());
    61             delete this->particles_;
     61            this->particles_->destroy();
    6262        }
    6363    }
  • code/branches/core5/src/modules/weapons/projectiles/Projectile.cc

    r5738 r5800  
    8484
    8585        if (this->bDestroy_)
    86             delete this;
     86            this->destroy(); // TODO: use a scheduler instead of deleting the object right here in tick()
    8787    }
    8888
     
    9090    {
    9191        if (GameMode::isMaster())
    92             delete this;
     92            this->destroy();
    9393    }
    9494
Note: See TracChangeset for help on using the changeset viewer.