-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Intro
Hi!
I am a PhD student at Zhejiang University. I use MuJoCo for my research on legged locomotion.
I use massively parallel environments for reinforcement learning with procedural terrain generation. After upgrading MuJoCo from 3.3.3 to 3.3.4 (which version replaces mjs_detachBody
with mjs_delete
), I found that a continuous memory leak occurs that had never happened before. I checked the source of MuJoCo and found that in version 3.3.3, mjs_detachBody
calls model->Detach(body);
, where subtree->Release();
is invoked.
However, after version 3.3.4, the implementation is moved to void mjCModel::operator-=(mjsElement* el)
, where the subtree->Release();
is removed. If I manually add subtree->Release();
, the memory leak is fixed.
Do I use the api in the wrong way? Or is this indeed a bug?
My setup
MuJoCo 3.3.3 - 3.3.6 C version
What's happening? What did you expect?
Memory leak.
Steps for reproduction
Simple code for reproduction may be hard to provide.
Minimal model for reproduction
No response
Code required for reproduction
No response
Confirmations
- I searched the latest documentation thoroughly before posting.
- I searched previous Issues and Discussions, I am certain this has not been raised before.