IDataObjectPool.ReturnObjectToPool(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Return an object to the pool in a reset, unused state.
public bool ReturnObjectToPool(object objectToReturn);
abstract member ReturnObjectToPool : obj -> bool
Public Function ReturnObjectToPool (objectToReturn As Object) As Boolean
Parameters
- objectToReturn
- Object
The object to return to the pool.
Returns
true if there was space for the prefab.
Remarks
If this method returns false, there was no space for the object and it is the caller's responsibility to destroy the object.
To place a pre-initialized object prefab into the pool, use AddPrefetchedObjectToPool instead.