X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fframework.cc;h=546ccb37590034e50865a989f2d3d9929513f38a;hb=bf8213041709c75147393c8bd6b51b8f9e064f7c;hp=f8bc78c916375b9cfc8019733b9cfc2a5c647ad9;hpb=858824dce02bade6464c404beef41da9321d58ef;p=awesomized%2Flibmemcached diff --git a/libtest/framework.cc b/libtest/framework.cc index f8bc78c9..546ccb37 100644 --- a/libtest/framework.cc +++ b/libtest/framework.cc @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -86,12 +87,8 @@ Framework::~Framework() delete _runner; - for (std::vector::iterator iter= _collection.begin(); - iter != _collection.end(); - ++iter) - { - delete *iter; - } + std::for_each(_collection.begin(), _collection.end(), DeleteFromVector()); + _collection.clear(); } bool Framework::match(const char* arg)