CreateItemPool
Creates item pool.
Synopsis
ItemPoolPtr CreateItemPool (long numToPreallocate, CreateProcPtr createProc, void *createArg)
Description
Creates an item pool with the specified number of items. The type of items in the pool is determined by the item creation function used to create the items. The function specified by createProc
is used to create the items in the pool.
Arguments
numToPreallocate
- Number of items to allocate for the pool.
createProc
- Pointer to the item creation function. The function can be any call that returns an item.
createArg
- Arguments to the item creation function.
Return Value
- Value
- Error Condition
- (Pointer to the item pool)
- None
NULL
- Could not allocate memory for pool
Associated Files
ItemPool.h