On numerous ocassions have I found people making mistakes in usage of the memory allocation routines acceptable to C++. Primarily between new, delete and malloc, free (and not to mention the array forms of new and delete).
A mistake can be very dangerous from a memory leak to undefined behavior that may make your computer dissappear! :D Of course, I am kidding but it is still dangerous.
Take a look at this FAQ entry that I posted on Codeguru regarding the topic - C++ Memory Management : What is the difference between malloc/free and new/delete?
Hope you find it useful.
Take care!
Saturday, April 14, 2007
Free New, Delete Malloc
Posted by
abnegator
at
4/14/2007 04:54:00 PM
Labels:
C++,
delete,
differences,
free,
malloc,
memory leak,
memory management,
new


Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment