What is the difference between new/delete and malloc/free?

来源:互联网 发布:experience优化效果 编辑:程序博客网 时间:2024/05/20 10:11
 

Malloc/free does not know about constructors and destructors. New and delete create and destroy objects, while malloc and free allocate and deallocate memory.

原创粉丝点击