feat: GC only if there's something to gc

This commit is contained in:
Leni Aniva 2024-05-17 23:05:32 -07:00
parent 926aaa4364
commit cf85bb6901
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 3 additions and 5 deletions

View File

@ -77,12 +77,10 @@ class Server:
Must be called periodically.
"""
if self.to_remove_goal_states:
self.run('goal.delete', {'stateIds': self.to_remove_goal_states})
self.to_remove_goal_states.clear()
def reset(self):
return self.run("reset", {})
def expr_type(self, expr: str) -> Expr:
"""
Evaluate the type of a given expression. This gives an error if the