diff --git a/gymnasium/envs/mujoco/mujoco_env.py b/gymnasium/envs/mujoco/mujoco_env.py index 1c1a986fe..956fda093 100644 --- a/gymnasium/envs/mujoco/mujoco_env.py +++ b/gymnasium/envs/mujoco/mujoco_env.py @@ -329,6 +329,7 @@ def _get_viewer( def close(self): if self.viewer is not None: + self.viewer.free() self.viewer = None self._viewers = {}