A* Pathfinding Project  3.8.5
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Events Macros Groups Pages
PathPool< T > Class Template Reference

Pools path objects to reduce load on the garbage collector. More...

Detailed Description

Pools path objects to reduce load on the garbage collector.

Deprecated:
Generic version is now obsolete to trade an extremely tiny performance decrease for a large decrease in boilerplate for Path classes
Type Constraints
T :Path 
T :new() 

Static Public Member Functions

static T GetPath ()
 
static int GetSize ()
 
static int GetTotalCreated ()
 
static void Recycle (T path)
 Recycles a path and puts in the pool.
 
static void Warmup (int count, int length)
 Warms up path, node list and vector list pools.
 

Member Function Documentation

static T GetPath ( )
static
static int GetSize ( )
static
static int GetTotalCreated ( )
static
static void Recycle ( path)
static

Recycles a path and puts in the pool.

This function should not be used directly. Instead use the Path.Claim and Path.Release functions.

static void Warmup ( int  count,
int  length 
)
static

Warms up path, node list and vector list pools.

Makes sure there is at least count paths, each with a minimum capacity for paths with length length in the pool. The capacity means that paths shorter or equal to the capacity can be calculated without any large allocations taking place.


The documentation for this class was generated from the following file: