摘要: operator new的一些原則:
a. 一般不要重寫全局的operator new, 具體可以參考 不要重載全局 ::operator new
b. 如果重載了operator new, 同時提供所有版本(plain new, nothrow new, placement new)
c. 成對的提供new和delete, 即如果重載了operator new, 同時重載operator delete
閱讀全文
posted @
2012-10-06 22:25 Richard Wei 閱讀(2761) |
評論 (0) |
編輯 收藏
摘要: C++編程規范...
閱讀全文
posted @
2012-10-06 20:05 Richard Wei 閱讀(879) |
評論 (0) |
編輯 收藏