Go Garbage Collection

2025-01-153 minTech Related
#golang

Automatic memory management in Go.

Go frees memory automatically.

Example:

func create() {
    data := make([]byte, 1_000_000)
    _ = data
} // memory is reclaimed automatically

No free(), delete(), or manual cleanup needed.