都是在堆(heap)上進行動態的內存操作。
用malloc函數需要指定內存分配的字節數並且不能初始化對象; new會自動調用對象的構造函數。
free不會調用對象的destructor; delete會調用對象的destructor
{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"typ
{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragr
{"type":"doc","content":[{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null