#ifndef UTIL_OBJECTS_KEEPER_HPP_ #define UTIL_OBJECTS_KEEPER_HPP_ #include #include namespace util { class ObjectsKeeper { std::vector> ptrs; public: virtual ~ObjectsKeeper() {} virtual void keepAlive(std::shared_ptr ptr) { ptrs.push_back(ptr); } }; } #endif // UTIL_OBJECTS_KEEPER_HPP_