[Scummvm-devel] Question about the overloading of 'free / alloc / realloc / ...'

Ludvig Strigeus strigeus at home.se
Wed May 1 08:11:19 CEST 2002


Hi!

It should be okay to remove those, and use standard 
malloc/free.

Best Regards,
Ludvig Strigeus

> Hi all,
> 
> Is there any real need to overload all the standard 
memory operators in the
> Scumm class ?
> 
> I think tools like Valgrind or Purify are better anyway 
than the (poor)
> protection the simple check done by our 
overloaded 'free'. Plus it then
> makes VERY difficult interactions between classes (for 
example a piece of
> memory allocated in Scumm and freed in any other class, 
which is the case
> now for the sound buffers which are freed by the 
SoundMixer class).
> 
> So anyone would object me deleting all the memory stuff 
in sys.cpp and
> replacing all the calls to this by standard ANSI C 
equivalents ?
> 
> If people object, the REAL way would be to have all Scumm 
objects inherit
> from a standard System class to then share the same 
implementations of these
> functions.
> 
>                         Lionel
> 
> PS: yeah, for once, we post on the mailing list instead 
of discussin on IRC
>     :-) 
> 
> -- 
> 		 Lionel Ulmer - http://www.bbrox.org/
> 
> 






More information about the Scummvm-devel mailing list