#ifndef ___TMPLTCOLL__ #define ___TMPLTCOLL__ #include #include /////////////////////////////////////////////////////////////// template class save_ptr_list : public std::list { public: typedef std::list ptr_list; ~save_ptr_list() { DeleteAll(); } void DeleteAll() { // typename std::list::iterator i; // for(ptr_list::iterator i = thjs.begin();i!=end();++i) // delete (*i); // clear(); } }; #include /////////////////////////////////////////////////////////////// template class save_ptr_vector : public std::vector { public: ~save_ptr_vector() { DeleteAll(); } void DeleteAll() { typename std::vector::iterator i; for(i = this.begin();i!=this.end();++i) delete (*i); this.clear(); } }; #endif