内存由两部分构成 Memory,和数据结构中的 Heap Data Structure, Stack Data Structure 区分

C/C++

Malloc and Calloc

MallocCalloc
Wont initialize valueWill initialize value (to 0)
FasterSlower

Malloc vs New

MallocNew
On heapOn heap
Dont call constructorCall Constructor

Free vs Delete

FreeDelete
frees memory dont call destructorCall destructor

C++ OOP