为了安全地清理向量或指针列表,你可以用最短的C++块来实现什么?(假设您必须在指针上调用delete?)
list<Foo*> foo_list;
我宁愿不使用Boost或用智能指针包装我的指针.
c++ stl
c++ ×1
stl ×1