MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / free

Method free

dm_control/mujoco/engine.py:432–443  ·  view source on GitHub ↗

Frees the native MuJoCo data structures held by this `Physics` instance. This is an advanced feature for use when manual memory management is necessary. This `Physics` object MUST NOT be used after this function has been called.

(self)

Source from the content-addressed store, hash-verified

430 data=index.struct_indexer(self.data, 'mjdata', axis_indexers),)
431
432 def free(self):
433 """Frees the native MuJoCo data structures held by this `Physics` instance.
434
435 This is an advanced feature for use when manual memory management is
436 necessary. This `Physics` object MUST NOT be used after this function has
437 been called.
438 """
439 with self._contexts_lock:
440 if self._contexts:
441 self._free_rendering_contexts()
442 if hasattr(self, '_data'):
443 del self._data
444
445 @classmethod
446 def from_model(cls, model):

Callers 5

_recompile_physicsMethod · 0.45
closeMethod · 0.45
testFreeIdempotentMethod · 0.45
renderMethod · 0.45

Calls 1

Tested by 1

testFreeIdempotentMethod · 0.36