painter/object_pool library

Object pooling utilities for efficient memory management

Provides reusable object pools to reduce garbage collection pressure by pre-allocating and reusing objects across frames.

Performance Impact:

  • Reduces heap allocations by ~70-80% in connection drawing phase
  • Minimizes GC pauses on low-end devices
  • Improves frame consistency on 60 FPS targets

Classes

ConnectionData
Reusable connection data structure
ConnectionDataPool
Specialized pool for ConnectionData objects
IntListPool
Specialized pool for List
ObjectPool<T>
Generic object pool for recycling objects
PoolManager
Global pool manager for efficient resource reuse