v
v copied to clipboard
`select` memory leak when compiled with `-autofree`
V version: V 0.2.2 b07f373.21bf8fe OS: windows, Microsoft Windows 10 Home v19042 64-bit
What did you do?
Ran the following program, compiled with the -autofree flag:
fn main() {
r := go run(chan int{})
r.wait()
}
fn run(ch chan int) {
for {
select {
v := <-ch {
println(v)
}
else {}
}
}
}
Opened the task manager and watched the memory consumption for the created process.
What did you expect to see? The memory usage to remain constant.
What did you see instead? The memory usage consistently increasing.