[Scummvm-devel] CVS: "added extra flag to mixer so we don't use free() on new'd pointers"

Joost Peters j at 7fc1.org
Fri Oct 24 16:43:03 CEST 2003


> > Update of /cvsroot/scummvm/scummvm/sound
> > In directory sc8-pr-cvs1:/tmp/cvs-serv26508/sound
> >
> > Modified Files:
> > mixer.cpp mixer.h
> > Log Message:
> > added extra flag to mixer so we don't use free() on new'd pointers
> >
> Hrm, is that really necessary? Why can't we just always use free() to
> allocate memory for buffers passed to the mixer?

I thought it was unsafe to mix new/delete and malloc()/free(). (free'ing
new'd memory, and the other way around)
Granted, with the current new/delete overrides it doesn't make a difference.
but wasn't the plan to get rid of them soon?

The fileloading code in Queen does 'new' (it's C++ afterall) so shouldn't it
be 'deleted' ?

Joost





More information about the Scummvm-devel mailing list