【发布时间】:2010-10-22 22:19:23
【问题描述】:
重复:In what cases do I use malloc vs new?
刚刚重读这个问题:
What is the difference between "new" and "malloc" and "calloc" in C++?
我检查了答案,但没有人回答这个问题:
- 什么时候可以使用 malloc 而不是 new?
有几个原因(我能想到两个)。
让最好的漂浮到顶部。
【问题讨论】:
-
@dana - 这没有解决当前的问题。
标签: c++ malloc new-operator dynamic-memory-allocation