| 1 | 
< | 
 /* | 
| 1 | 
> | 
/* | 
| 2 | 
  | 
 * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved. | 
| 3 | 
  | 
 * | 
| 4 | 
  | 
 * The University of Notre Dame grants you ("Licensee") a | 
| 51 | 
  | 
 | 
| 52 | 
  | 
 | 
| 53 | 
  | 
namespace oopse { | 
| 54 | 
< | 
    class MemoryUtils{ | 
| 55 | 
< | 
        public: | 
| 54 | 
> | 
  class MemoryUtils{ | 
| 55 | 
> | 
  public: | 
| 56 | 
  | 
 | 
| 57 | 
< | 
            template<typename ContainterType> | 
| 58 | 
< | 
            static void deletePointers(ContainterType& container) { | 
| 59 | 
< | 
                for (typename ContainterType::iterator i = container.begin(); i != container.end(); i++) { | 
| 60 | 
< | 
                    delete *i; | 
| 61 | 
< | 
                } | 
| 57 | 
> | 
    template<typename ContainterType> | 
| 58 | 
> | 
    static void deletePointers(ContainterType& container) { | 
| 59 | 
> | 
      for (typename ContainterType::iterator i = container.begin(); i != container.end(); i++) { | 
| 60 | 
> | 
        delete *i; | 
| 61 | 
> | 
      } | 
| 62 | 
  | 
                 | 
| 63 | 
< | 
                container.clear(); | 
| 64 | 
< | 
            } | 
| 65 | 
< | 
    }; | 
| 63 | 
> | 
      container.clear(); | 
| 64 | 
> | 
    } | 
| 65 | 
> | 
  }; | 
| 66 | 
  | 
} | 
| 67 | 
  | 
#endif //UTILS_MEMORYUTILS_HPP |