Skip to main content
This is lesson 3 of 7 in this module Course 57% complete

Heap Compaction and Object References

Premium Content

Sign in with your account or sign up to access this lesson.

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.