Heap Compaction and Object References
We explain why heap compaction requires that references cannot be raw memory addresses, leading to .NET's double-pointer design where every reference is a pointer-to-a-pointer managed by the garbage collector. The lesson also covers the unsafe keyword and the fixed statement which temporarily pins objects on the heap so that native pointers can be used safely.
Previous Module
Array Performance Optimizations
This Module
The .NET Garbage Collector