Re: memory debugging and C++ (program keeps crashing)
On Sun, Sep 29, 2002 at 04:38:06PM -0500, Shyamal Prasad wrote:
> "Marc" == Marc Singer <elf@buici.com> writes:
>
> Marc> Actually, with GCC it doesn't matter which call you use.
> Marc> New uses the malloc function. You can free () or delete
> Marc> memory allocated with malloc () or new. New and delete are
> Marc> 'syntactic sugar' for malloc and free.
>
> You mean that very loosely, right? new and delete call constructors
> and destructors respectively. This is particularly important when you
> do stuff like delete [].
I still mean the 'syntactic sugar' part.
new <= { malloc ; initialize }
and so on.
Reply to: