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)
| 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): |