摘要: 第一部分:基本概念 1. new和operator new 看如下代码: class MyClass {…}; MyClass * p=new MyClass; 这里的new实际上是执行如下3个过程: 1. 调用operator new分配内存 ;2. 调用构造函数生成类对象;3. 返回相应指针。 operator new就像operator+一样,是可以重载的,但是不能在全局... 阅读全文
posted @ 2009-02-23 23:31 能巴 阅读(235) 评论(0) 推荐(0)
摘要: Codeguru has a good article: http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4079 Part Of it: What Is an Allocator? If you take a look at the word allocator, you might already know that it ... 阅读全文
posted @ 2009-02-23 22:44 能巴 阅读(439) 评论(0) 推荐(0)