GarbageCollectTimer
A class in Root.Township, the global namespace.
Headless server only: runs a non-blocking garbage collection every few seconds. Only the first instance starts the loop.
- Listed in Global namespace: E to H
- Inherits or implements
MonoBehaviour - Documented in Server lifecycle
Constructors
| Member | What it is |
|---|---|
GarbageCollectTimer() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private float interval | Seconds between collections (2 by default). |
private static Logger logger | NLog logger for this class. |
private GCCollectionMode mode | GC collection mode (Optimized by default). |
private float nextTime | Not used. |
private static AltaCoroutine runGcCollect | The shared GC coroutine, so only one runs. |