All pastes #557853 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-06-11 04:05 UTC
rendered paste body
template <class container>inline void DeleteSTLContainer(container& c){  for (container::iterator it = c.begin(); it!=c.end(); ++it)  {    delete *it;    *it = NULL;  }}template <class map>inline void DeleteSTLMap(map& m){  for (map::iterator it = m.begin(); it!=m.end(); ++it)  {    delete it->second;    it->second = NULL;  }}