Function push

  • Push back an object instance into the object pool
    Object pooling for the object class must be enabled, and object must have been instantiated using pull, otherwise this function won't work

    Parameters

    • obj: object

      instance to be recycled

    • OptionalthrowOnError: boolean = true

      throw an exception if the object cannot be recycled

    Returns boolean

    true if the object was successfully recycled in the object pool

    will throw an error if the object cannot be recycled