Garbage Collection (GC) algorithms

As an iOS developer, I am quite familiar with Reference Counting. It is considered a fundamental knowledge regarding memory manangement that every iOS developers must acknowledge. Today, I figured out a few more algorithms of garbage collection.

Fig 1. From left to right: Reference Counting, Mark-Sweep, Mark-Compact, Copying.

Reference Counting (RC)

Mark-Sweep

Mark-Compact

Copying