Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardGoEscape analysisSingle-choice MCQ

A common surprise: passing a value to `fmt.Println` (or any function taking `...interface{}`) often causes it to escape. Why does interface conversion frequently force a heap allocation in this case?

func g() { n := 10 fmt.Println(n) }