You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
187B

  1. #if!defined MEMORY_HPP
  2. #define MEMORY_HPP
  3. #include <cstdlib>
  4. template <class T>
  5. struct FreeDeleter
  6. {
  7. void operator()(T* ptr)const
  8. {
  9. if (ptr)
  10. {
  11. std::free(ptr);
  12. }
  13. }
  14. };
  15. #endif