Who frees memory.
MANUAL MANAGEMENT
The programmer allocates and frees explicitly.
What it provides: complete control and predictable performance.
What it costs: memory leaks when freeing is forgotten, and serious faults when memory is used after freeing.
GARBAGE COLLECTION
The runtime identifies and frees unused memory automatically.
What it provides: safety and convenience.
What it costs: pauses, memory overhead, and less predictable timing.
REFERENCE COUNTING
Tracking how many references exist, freeing when none remain.
What it costs: cycles are never freed without additional handling.
OWNERSHIP SYSTEMS
Rules enforced at compile time determining who owns memory and when it is released.
What it provides: safety with no runtime collection.
What it costs: a significant learning curve.
WHY THIS MATTERS
Memory faults are among the most serious classes of vulnerability, historically.
WHAT THAT HAS DRIVEN
Increasing preference for memory-safe languages in security-sensitive work.
WHAT TO UNDERSTAND FOR ANY LANGUAGE
Which approach it uses, and what that implies for performance and safety.