[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: memory debugging and C++ (program keeps crashing)



    "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 [].

/Shyamal



Reply to: