Retrieves a Matrix instance from the pool.
Retrieves a Matrix3D instance from the pool.
@param identity If enabled, the matrix will be reset to the identity. Otherwise, its contents is undefined.
Retrieves a Point instance from the pool.
Retrieves a Vector3D instance from the pool.
Retrieves a Rectangle instance from the pool.
Stores a Matrix instance in the pool. Don't keep any references to the object after moving it to the pool!
Stores a Matrix3D instance in the pool. Don't keep any references to the object after moving it to the pool!
Stores a Point instance in the pool. Don't keep any references to the object after moving it to the pool!
Stores a Vector3D instance in the pool. Don't keep any references to the object after moving it to the pool!
Stores a Rectangle instance in the pool. Don't keep any references to the object after moving it to the pool!
Generated using TypeDoc
A simple object pool supporting the most basic utility objects.
If you want to retrieve an object, but the pool does not contain any more instances, it will silently create a new one.
It's important that you use the pool in a balanced way, i.e. don't just "get" or "put" alone! Always make the calls in pairs; whenever you get an object, be sure to put it back later, and the other way round. Otherwise, the pool will empty or (even worse) grow in size uncontrolled.