Delete plugins when their corresponding objects are deleted, if their instance belonged the object.
Fixes #2061. PiperOrigin-RevId: 676402701 Change-Id: Ia4807d57a3763e2100702b7e7ec96c300d0a9cfb
This commit is contained in:
committed by
Copybara-Service
parent
f161b63a22
commit
f4381e12a2
@@ -269,6 +269,9 @@ void mjCMesh::CopyFromSpec() {
|
||||
mjCMesh::~mjCMesh() {
|
||||
if (center_) mju_free(center_);
|
||||
if (graph_) mju_free(graph_);
|
||||
if (spec.plugin.active && spec.plugin.instance_name->empty()) {
|
||||
model->DeleteElement(spec.plugin.instance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user