Add a close() method to mujoco.Renderer which explicitly frees the gl context.

PiperOrigin-RevId: 590221484
Change-Id: I07392f9c53f662a37a57ab23acfef9aa5a98a49b
This commit is contained in:
Kevin Zakka
2023-12-12 08:58:49 -08:00
committed by Copybara-Service
parent e3df84ec3f
commit 53883ce86a
4 changed files with 100 additions and 62 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ class GLContext:
if glfw.get_current_context() == self._context:
glfw.make_context_current(None)
glfw.destroy_window(self._context)
self._context = None
self._context = None
def __del__(self):
self.free()