Mail Archives: djgpp/1997/05/28/15:37:29
Nathan Gray <gray AT ll DOT mit DOT edu> writes:
> Since we're on the subject of C and C++, does anyone have a good
> explanation for the differences between malloc() and new? As a native
> C++ programmer, my first instinct is to use new, but I see malloc() so
> often I'm starting to wonder if I'm missing something.
malloc() doesn't call the class' constructor. operator new can also be
overloaded (on a per-class basis) to implement sub-allocation or any
custom allocation schemes.
Paolo
--
The opinions expressed here are exclusively my own
Remove the extra junk to my e-mail address to reply, sorry for the
inconvenience, I get spammed a lot.
- Raw text -