|Synopsis:||Use new and delete instead of malloc, calloc, realloc, free and cfree|
|Category:||Parts of C++ to Avoid|
In C malloc, realloc and free are used to allocate memory dynamically on the heap. This may lead to conflicts with the use of the new and delete operators in C++. It is dangerous to:
Note that the C library function "strdup" implicitly allocates memory that must be freed using "free". It's better not to use this function in C++.