C# Class Nez.ListPool

simple static class that can be used to pool Lists
Afficher le fichier Open project: lihaochen910/UnityGoapAIDemo

Méthodes publiques

Méthode Description
clearCache ( ) : void

clears out the cache

free ( List obj ) : void

pushes an item back on the stack

obtain ( ) : List

pops an item off the stack if available creating a new item as necessary

trimCache ( int cacheCount ) : void

trims the cache down to cacheCount items

warmCache ( int cacheCount ) : void

warms up the cache filling it with a max of cacheCount objects

Method Details

clearCache() public static méthode

clears out the cache
public static clearCache ( ) : void
Résultat void

free() public static méthode

pushes an item back on the stack
public static free ( List obj ) : void
obj List Object.
Résultat void

obtain() public static méthode

pops an item off the stack if available creating a new item as necessary
public static obtain ( ) : List
Résultat List

trimCache() public static méthode

trims the cache down to cacheCount items
public static trimCache ( int cacheCount ) : void
cacheCount int Cache count.
Résultat void

warmCache() public static méthode

warms up the cache filling it with a max of cacheCount objects
public static warmCache ( int cacheCount ) : void
cacheCount int new cache count
Résultat void