これはここで数回出てきましたGo
が、私の経験はユニークだと思います. これが私のコードです。
type Stack []Weight
func newStack( size int, startSpread Spread ) Stack {
stack := make(Stack, size)
for _, curWeight := range stack {
curWeight = Weight{ startSpread, rand.Float64( ), rand.Float64( ) }
}
return stack
}
gc
を使用していないと表示されるのはなぜcurWeight
ですか?