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

compiler: do not free memory on Windows for now

This commit is contained in:
Alexander Medvednikov 2019-09-13 16:27:01 +03:00
parent 7f3cfea02b
commit 21f3b9eccc

View File

@ -1068,6 +1068,7 @@ fn (p mut Parser) close_scope() {
break break
} }
// Clean up memory, only do this for V compiler for now // Clean up memory, only do this for V compiler for now
$if !windows {
if p.pref.building_v && v.is_alloc && !p.pref.is_test { if p.pref.building_v && v.is_alloc && !p.pref.is_test {
mut free_fn := 'free' mut free_fn := 'free'
if v.typ.starts_with('array_') { if v.typ.starts_with('array_') {
@ -1093,6 +1094,7 @@ fn (p mut Parser) close_scope() {
} }
} }
} }
}
if p.cur_fn.defer_text.last() != '' { if p.cur_fn.defer_text.last() != '' {
p.genln(p.cur_fn.defer_text.last()) p.genln(p.cur_fn.defer_text.last())
//p.cur_fn.defer_text[f] = '' //p.cur_fn.defer_text[f] = ''