Ticket #8847: memoryleak2.patch

File memoryleak2.patch, 1.7 KB (added by SF/gamblore, 17 years ago)
  • gui/newgui.cpp

     
    121121        _themeChange = false;
    122122}
    123123
     124NewGui::~NewGui() {
     125        delete _theme;
     126}
     127
    124128bool NewGui::loadNewTheme(const Common::String &style) {
    125129        Common::String styleType;
    126130        Common::ConfigFile cfg;
  • gui/newgui.h

     
    6666        friend class Dialog;
    6767        friend class Common::Singleton<SingletonBaseType>;
    6868        NewGui();
     69        ~NewGui();
    6970public:
    7071
    7172        // Main entry for the GUI: this will start an event loop that keeps running
  • graphics/font.cpp

     
    161161        free(pf->bits);
    162162        free(pf->offset);
    163163        free(pf->width);
     164        free(pf->bbx);
    164165        free(pf);
    165166}
    166167
  • graphics/scaler.cpp

     
    112112}
    113113
    114114void DestroyScalers(){
     115#ifndef DISABLE_HQ_SCALERS
    115116        free(RGBtoYUV);
    116117        free(LUT16to32);
    117118        RGBtoYUV = 0;
    118119        LUT16to32 = 0;
     120#endif
    119121}
    120122
    121123
  • base/main.cpp

     
    332332        PluginManager::instance().unloadPluginsExcept(NULL);
    333333        PluginManager::instance().destroy();
    334334        ConfMan.destroy();
    335         delete g_gui.theme();
     335        g_gui.destroy();
    336336
    337337        return 0;
    338338}