memleak fix

This commit is contained in:
2019-11-04 16:30:06 +03:00
parent 8c428838d6
commit fd27dfd636
2 changed files with 2 additions and 0 deletions

View File

@ -21,6 +21,7 @@ func (g *GameState) Do(f func()) {
done := make(chan struct{}, 1)
g.Mainfunc <- func() {
f()
f = nil //zero pointer for closure function
done <- struct{}{}
}
<-done