pool
Creates a Pool instance and then generates the object by passing in the Pool instance.
Parameters
preallocate
the number of objects to preallocate
gen
the object generate function to create a new object when needed
Creates a Pool instance and then generates the object by passing in the Pool instance.
the number of objects to preallocate
the object generate function to create a new object when needed