都是在堆(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