1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: free temporary channel arrays (#8324)

This commit is contained in:
Emily Hudson 2021-01-24 13:02:17 -06:00 committed by GitHub
parent 29d6e40f29
commit 2e695a8e8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3755,6 +3755,10 @@ fn (mut g Gen) select_expr(node ast.SelectExpr) {
g.write('-1')
}
g.writeln(');')
// free the temps that were created
g.writeln('array_free(&$objs_array);')
g.writeln('array_free(&$directions_array);')
g.writeln('array_free(&$chan_array);')
mut i := 0
for j in 0 .. node.branches.len {
if j > 0 {