Item 27: Requiring or prohibiting heap-based objects.(More Effective C++)
摘要:
The idea is to take advantage of the fact that when an object is allocated on the heap, operator new is called to allocate the raw memory, then a constructor is called to initialize an object in that memory. Preventing clients from directly instantiating objects on the heap is easy, because such... 阅读全文
posted @ 2012-03-14 15:06 Ray Z 阅读(175) 评论(0) 推荐(0)