Skip to content

Memory Management

Zap uses Automatic Reference Counting (ARC) to manage its memory.

  • Automatic: Memory is automatically allocated and deallocated.
  • Deterministic: Objects are destroyed as soon as they are no longer referenced.
  • Lower Overhead: No periodic garbage collection pauses mean better predictability and performance.
  • Smaller memory footprint compared to GC-based languages.
  • Faster cold starts and consistent performance.
  • Predictable behavior in real-time or low-latency systems.