holly: 再解释一下 [阅读: 449] 2007-03-04 03:08:18 不是说不对, 这种用法完全对. 但是比较符合目前 C++ 的 idiom 的方式是 class TObject { private: std::auto_ptr<TOtherObject> otherObjPtr; public: TObject() throw() { // never leak otherObjPtr = new TOtherObject(); }