Line data Source code
1 : #pragma once 2 : 3 : #include <memory> 4 : 5 : namespace Envoy { 6 : namespace Event { 7 : 8 : /** 9 : * If an object derives from this class, it can be passed to the destination dispatcher who 10 : * guarantees to delete it in that dispatcher thread. The common use case is to ensure config 11 : * related objects are deleted in the main thread. 12 : */ 13 : class DispatcherThreadDeletable { 14 : public: 15 159 : virtual ~DispatcherThreadDeletable() = default; 16 : }; 17 : 18 : using DispatcherThreadDeletableConstPtr = std::unique_ptr<const DispatcherThreadDeletable>; 19 : 20 : } // namespace Event 21 : } // namespace Envoy