mirror of https://github.com/stella-emu/stella.git
Fixed some memory leaks. Some things which were new'ed weren't being
deleted. Barring any major bugs or memory leaks, this will be my last release for the next major version (Stella 1.2). git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@46 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
3c3bc5b9b3
commit
c67481c440
|
@ -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: Snapshot.cxx,v 1.1 2002-03-10 01:29:54 stephena Exp $
|
||||
// $Id: Snapshot.cxx,v 1.2 2002-03-12 19:27:11 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <png.h>
|
||||
|
@ -173,6 +173,7 @@ int Snapshot::savePNG(string filename, MediaSource& mediaSource, int multiplier)
|
|||
delete[] newScanline;
|
||||
|
||||
out->close();
|
||||
delete out;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -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: mainX11.cxx,v 1.12 2002-03-10 01:29:55 stephena Exp $
|
||||
// $Id: mainX11.cxx,v 1.13 2002-03-12 19:27:11 stephena Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <fstream>
|
||||
|
@ -1491,6 +1491,11 @@ void cleanup()
|
|||
if(theConsole)
|
||||
delete theConsole;
|
||||
|
||||
#ifdef HAVE_PNG
|
||||
if(snapshot)
|
||||
delete snapshot;
|
||||
#endif
|
||||
|
||||
if(normalCursor)
|
||||
XFreeCursor(theDisplay, normalCursor);
|
||||
if(blankCursor)
|
||||
|
|
Loading…
Reference in New Issue