#include <treeobj.h>
Public Methods | |
csPolygonStubPool () | |
Create an empty pool. | |
~csPolygonStubPool () | |
Destroy pool and all objects in the pool. | |
csPolygonStub* | Alloc (csPolygonStubFactory *factory) |
Allocate a new object in the pool. More... | |
void | Free (csPolygonStub *ps) |
Free an object and put it back in the pool. More... | |
void | Dump () |
Dump some information about this pool. |
You control which type of csPolygonStub you need by the factory that you give with Alloc(). You can ask new instances from this pool. If needed it will allocate one for you but ideally it can give you one which was allocated earlier.
|
Allocate a new object in the pool. The object is initialized to empty. |
|
Free an object and put it back in the pool. This function will call DecRef on the stub and only free it for real if the ref counter reaches zero. Note that it is only legal to free objects which were allocated from the pool. |