Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5799


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

replaced delete with destroy() in gamestates

Location:
code/branches/core5/src/modules/gamestates
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/modules/gamestates/GSGraphics.cc

    r5738 r5799  
    7474    {
    7575        InputManager::getInstance().destroyState("master");
    76         delete this->masterKeyBinder_;
     76        this->masterKeyBinder_->destroy();
    7777    }
    7878
     
    134134*/
    135135
    136         delete this->console_;
     136        this->console_->destroy();
    137137
    138138        Loader::unload(this->debugOverlay_);
    139139        delete this->debugOverlay_;
    140140
    141         delete this->soundManager_;
     141        this->soundManager_->destroy();
    142142
    143143        // HACK: (destroys a resource smart pointer)
  • code/branches/core5/src/modules/gamestates/GSLevel.cc

    r5738 r5799  
    188188        if (this->radar_)
    189189        {
    190             delete this->radar_;
     190            this->radar_->destroy();
    191191            this->radar_ = 0;
    192192        }
     
    200200        if (this->playerManager_)
    201201        {
    202             delete this->playerManager_;
     202            this->playerManager_->destroy();
    203203            this->playerManager_ = 0;
    204204        }
     
    218218            if (this->keyBinder_)
    219219            {
    220                 delete this->keyBinder_;
     220                this->keyBinder_->destroy();
    221221                this->keyBinder_ = 0;
    222222            }
  • code/branches/core5/src/modules/gamestates/GSMainMenu.cc

    r5738 r5799  
    6565
    6666        this->scene_->getSceneManager()->destroyCamera(this->camera_);
    67         delete this->scene_;
     67        this->scene_->destroy();
    6868    }
    6969
     
    108108    void GSMainMenu::deactivate()
    109109    {
    110         delete this->ambient_;
     110        this->ambient_->destroy();
    111111
    112112        InputManager::getInstance().leaveState("mainMenu");
  • code/branches/core5/src/modules/gamestates/GSRoot.cc

    r5785 r5799  
    9999*/
    100100
    101         delete this->levelManager_;
     101        this->levelManager_->destroy();
    102102    }
    103103
Note: See TracChangeset for help on using the changeset viewer.