Quantcast
Channel: C++博客-厚积薄发-随笔分类-C++
Viewing all articles
Browse latest Browse all 29

理解C++中new背后的行为

$
0
0
     摘要: operator new的一些原则:
a. 一般不要重写全局的operator new, 具体可以参考 不要重载全局 ::operator new
b. 如果重载了operator new, 同时提供所有版本(plain new, nothrow new, placement new)
c. 成对的提供new和delete, 即如果重载了operator new, 同时重载operator delete  阅读全文

Richard Wei 2012-10-06 22:25 发表评论

Viewing all articles
Browse latest Browse all 29

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>