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

memory: remove if false

This commit is contained in:
Alexander Medvednikov 2020-03-22 08:59:44 +01:00
parent c50c6812ce
commit 1ad417734e

View File

@ -550,14 +550,14 @@ fn (g mut Gen) gen_fn_decl(it ast.FnDecl) {
g.stmt(stmt)
}
// ////////////
if g.autofree && false {
if g.autofree {
scope := g.file.scope.innermost(it.pos.pos - 1)
for _, var in scope.vars {
sym := g.table.get_type_symbol(var.typ)
if sym.kind == .array && !table.type_is_optional(var.typ) {
g.writeln('array_free($var.name); // autofree')
}
println(var.name)
// println(var.name)
}
}
// /////////