Updated: fixed memory leak
This commit is contained in:
parent
2ed8fae5d6
commit
222b838e53
1 changed files with 2 additions and 0 deletions
|
@ -507,7 +507,9 @@ void run() {
|
|||
switch (choice) {
|
||||
case '1':
|
||||
if (!isAlive) {
|
||||
cleanup();
|
||||
snake = startSnake();
|
||||
apple = startApple();
|
||||
isAlive = true;
|
||||
speed = minSpeed;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue