Pools path objects to reduce load on the garbage collector.
More...
Pools path objects to reduce load on the garbage collector.
|
static T | GetPath< T > () |
| Get a path from the pool or create a new one if the pool is empty. More...
|
|
static int | GetSize (Type type) |
| Number of pooled instances of a path of the specified type. More...
|
|
static int | GetTotalCreated (Type type) |
| Total created instances of paths of the specified type. More...
|
|
static void | Pool (Path path) |
| Adds a path to the pool. More...
|
|
|
static readonly Dictionary< Type, Stack< Path > > | pool = new Dictionary<Type, Stack<Path> >() |
|
static readonly Dictionary< Type, int > | totalCreated = new Dictionary<Type, int>() |
|
◆ GetPath< T >()
static T GetPath< T > |
( |
| ) |
|
|
static |
Get a path from the pool or create a new one if the pool is empty.
◆ GetSize()
static int GetSize |
( |
Type |
type | ) |
|
|
static |
Number of pooled instances of a path of the specified type.
◆ GetTotalCreated()
static int GetTotalCreated |
( |
Type |
type | ) |
|
|
static |
Total created instances of paths of the specified type.
◆ Pool()
static void Pool |
( |
Path |
path | ) |
|
|
static |
Adds a path to the pool.
This function should not be used directly. Instead use the Path.Claim and Path.Release functions.
◆ pool
readonly Dictionary<Type, Stack<Path> > pool = new Dictionary<Type, Stack<Path> >() |
|
staticprivate |
◆ totalCreated
readonly Dictionary<Type, int> totalCreated = new Dictionary<Type, int>() |
|
staticprivate |
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Core/Misc/PathPool.cs