#include <ObjectPool.h>
Inheritance diagram for AbstractObjectRecycler:

Public Member Functions | |
| AbstractObjectRecycler () | |
| Default constructor. | |
| virtual | ~AbstractObjectRecycler () |
| Default destructor. | |
| virtual void | RecycleObject (void *obj)=0 |
| Should be implemented to downcast (obj) to the correct type, and recycle it (typically by calling ReleaseObject(). | |
| virtual uint32 | FlushCachedObjects ()=0 |
| Should be implemented to destroy all objects we have cached and return the number of objects that were destroyed. | |
Static Public Member Functions | |
| static void | GlobalFlushAllCachedObjects () |
| Walks the linked list of all AbstractObjectRecyclers, calling FlushCachedObjects() on each one, until all cached objects have been destroyed. | |
Used to support polymorphism in our reference counting.
Definition at line 43 of file ObjectPool.h.
| AbstractObjectRecycler::AbstractObjectRecycler | ( | ) |
Default constructor.
Registers us with the global recyclers list.
| virtual AbstractObjectRecycler::~AbstractObjectRecycler | ( | ) | [virtual] |
Default destructor.
Unregisters us from the global recyclers list.
| virtual void AbstractObjectRecycler::RecycleObject | ( | void * | obj | ) | [pure virtual] |
Should be implemented to downcast (obj) to the correct type, and recycle it (typically by calling ReleaseObject().
| obj | Pointer to the object to recycle. Must point to an object of the correct type. May be NULL, in which case this method is a no-op. |
Implemented in ObjectPool< Object >.
| static void AbstractObjectRecycler::GlobalFlushAllCachedObjects | ( | ) | [static] |
Walks the linked list of all AbstractObjectRecyclers, calling FlushCachedObjects() on each one, until all cached objects have been destroyed.
This method is called by the SetupSystem destructor, to ensure that all objects have been deleted before main() returns, so that shutdown ordering issues do not cause bad memory writes, etc.
1.5.1