Some fixes for memory leaks and uninitialized variables detected by

Valgrind.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1608 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-01-11 15:01:36 +00:00
parent c895942252
commit 85cc67bdc2
5 changed files with 12 additions and 5 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: CheatCodeDialog.cxx,v 1.25 2009-01-04 22:27:43 stephena Exp $
// $Id: CheatCodeDialog.cxx,v 1.26 2009-01-11 15:01:36 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -102,6 +102,7 @@ CheatCodeDialog::CheatCodeDialog(OSystem* osystem, DialogContainer* parent,
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
CheatCodeDialog::~CheatCodeDialog()
{
delete myCheatInput;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: RamWidget.cxx,v 1.21 2009-01-01 18:13:35 stephena Exp $
// $Id: RamWidget.cxx,v 1.22 2009-01-11 15:01:36 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -142,6 +142,7 @@ RamWidget::RamWidget(GuiObject* boss, const GUI::Font& font, int x, int y)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
RamWidget::~RamWidget()
{
delete myInputBox;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: RomWidget.cxx,v 1.28 2009-01-01 18:13:35 stephena Exp $
// $Id: RomWidget.cxx,v 1.29 2009-01-11 15:01:36 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -105,6 +105,8 @@ RomWidget::~RomWidget()
{
myAddrList.clear();
myLineList.clear();
delete mySaveRom;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: OSystem.cxx,v 1.143 2009-01-05 19:44:29 stephena Exp $
// $Id: OSystem.cxx,v 1.144 2009-01-11 15:01:36 stephena Exp $
//============================================================================
#include <cassert>
@ -142,7 +142,9 @@ OSystem::~OSystem()
delete myCommandMenu;
delete myLauncher;
delete myFont;
delete mySmallFont;
delete myConsoleFont;
delete myLauncherFont;
// Remove any game console that is currently attached
deleteConsole();

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: TIA.cxx,v 1.96 2009-01-03 15:44:13 stephena Exp $
// $Id: TIA.cxx,v 1.97 2009-01-11 15:01:36 stephena Exp $
//============================================================================
//#define DEBUG_HMOVE
@ -43,6 +43,7 @@ TIA::TIA(Console& console, Settings& settings)
mySettings(settings),
mySound(NULL),
myColorLossEnabled(false),
myPartialFrameFlag(false),
myMaximumNumberOfScanlines(262),
myCOLUBK(myColor[0]),
myCOLUPF(myColor[1]),