Skip to content

Commit c70cebc

Browse files
TimSchneider42Tim Schneider
andauthored
Removed destructor of VectorEnv as it causes VectorEnv.close() to be called unintentionally. Fixes #1521. (#1522)
Co-authored-by: Tim Schneider <tim@robot-learning.de>
1 parent bdd88da commit c70cebc

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

gymnasium/vector/vector_env.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,6 @@ def _add_info(
335335
vector_infos[key], vector_infos[f"_{key}"] = array, array_mask
336336
return vector_infos
337337

338-
def __del__(self):
339-
"""Closes the vector environment."""
340-
if not getattr(self, "closed", True):
341-
self.close()
342-
343338
def __repr__(self) -> str:
344339
"""Returns a string representation of the vector environment.
345340

0 commit comments

Comments
 (0)