Class ObjectPool

Public

Lightweight object Pool for IAstarPooledObject.

Handy class for pooling objects of type T which implements the IAstarPooledObject interface.

Usage:

  • Claim a new object usingSomeClass foo = ObjectPool<SomeClass>.Claim ();

  • Use it and do stuff with it

  • Release it withObjectPool<SomeClass>.Release (foo);

After you have released a object, you should never use it again.

Since

Version 3.2

Version

Since 3.7.6 this class is thread safe

Public Static Methods

Claim ()
Release (obj)