fix memory leak
This commit is contained in:
parent
7112e3cf67
commit
46910fa0e7
1 changed files with 3 additions and 2 deletions
|
@ -29,6 +29,7 @@ main :: proc() {
|
||||||
print_board :: proc(state: ^[AREA]bool) {
|
print_board :: proc(state: ^[AREA]bool) {
|
||||||
for y := 0; y < HEIGHT; y += 2{
|
for y := 0; y < HEIGHT; y += 2{
|
||||||
line := strings.builder_make()
|
line := strings.builder_make()
|
||||||
|
defer strings.builder_destroy(&line)
|
||||||
for x in 0..<WIDTH{
|
for x in 0..<WIDTH{
|
||||||
top := state[x + y * WIDTH]
|
top := state[x + y * WIDTH]
|
||||||
bot := state[x + (y+1) * WIDTH ]
|
bot := state[x + (y+1) * WIDTH ]
|
||||||
|
|
Loading…
Reference in a new issue