setup
Setup structure containing a set of reusable objects.
Parameters
reset
the function that reset an existing object to its initial state
preallocate
the number of objects to preallocate
gen
the object generate function to create a new object when needed