Skip to content

Commit

Permalink
Fix memory leak in waterworld_v4 by clearing old handlers before addi…
Browse files Browse the repository at this point in the history
…ng new ones (#1218)
  • Loading branch information
florin-pop authored Jul 2, 2024
1 parent 4d75d86 commit ace3894
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pettingzoo/sisl/waterworld/waterworld_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ def draw(self):

def add_handlers(self):
# Collision handlers for pursuers v.s. evaders & poisons
self.handlers = []

for pursuer in self.pursuers:
for obj in self.evaders:
self.handlers.append(
Expand Down

0 comments on commit ace3894

Please sign in to comment.