1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#pragma once #include <cstdlib> namespace phosphor { namespace utility { /** @struct Free * @brief A malloc cleanup type for use with smart pointers. */ template <typename T> struct Free { void operator()(T* ptr) const { free(ptr); } }; } // namespace utility } // namespace phosphor // vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4