object_pool_pattern::Reusable
-
class Reusable
Abstract interface for reusable objects in the Object Pool Pattern.
Classes implementing this interface represent objects that can be managed by an object pool. These objects must define how they are used and reset to their initial state.
Subclassed by object_pool_pattern::ConcreteReusable
Public Functions
-
virtual ~Reusable() = default
Virtual destructor for proper cleanup in derived classes.
-
virtual void use() = 0
Use the reusable object for its intended purpose.
Derived classes should provide concrete implementations of this method to define how the object is used.
-
virtual void reset() = 0
Reset the reusable object to its initial state.
This method ensures that objects can be safely reused by the pool, clearing any state or data from previous usage.
-
virtual ~Reusable() = default