moveToPool method

void moveToPool()

Calls the cleanup function and moves this object to the ObjectPool.

Implementation

void moveToPool() {
  cleanUp();
  ObjectPool.add<T>(this as T);
}