Before we dig into why storing a value in an interface can result in a heap allocation, we need to discuss escape analysis:
- An overview: an overview of escape analysis
- Leak: potential for increased pressure on the garbage collector
- Escape: when go is unable to store a reference type on the stack
- Move: when go moves a value type into the heap
- Tests: a test suite to validate what we have learned
Next: An overview