[Scummvm-devel] Re: [Scummvm-cvs-logs] CVS: scummvm/simon sound.cpp,1.29,1.30

Max Horn max at quendi.de
Thu Jul 24 04:55:12 CEST 2003


Am Donnerstag, 24.07.03 um 12:20 Uhr schrieb Travis Howell:

> Update of /cvsroot/scummvm/scummvm/simon
> In directory sc8-pr-cvs1:/tmp/cvs-serv14923/simon
>
> Modified Files:
> 	sound.cpp
> Log Message:
>
> Fix for simon2mac voices problem, bug #776803
>
>
> Index: sound.cpp
> ===================================================================
> RCS file: /cvsroot/scummvm/scummvm/simon/sound.cpp,v
> retrieving revision 1.29
> retrieving revision 1.30
> diff -u -d -r1.29 -r1.30
> --- sound.cpp	21 Jul 2003 04:00:04 -0000	1.29
> +++ sound.cpp	24 Jul 2003 10:20:56 -0000	1.30
> @@ -434,7 +434,6 @@
>  		if (file->isOpen() == false) {
>  			warning("Can't open voice file %s", filename);
>  		} else {
> -			delete _voice;
>  			_voice = new WavSound(_mixer, file, _offsets);
>  		}
>  	}
Hm, why is this needed, exactly? And how do you fix the memory leak? 
I.e. the memory to which _voice points to must be released at some 
point. Since it's not release here anymore, when is it released then?


Max





More information about the Scummvm-devel mailing list