Skip to content

Commit

Permalink
wip: remove excessive keep_alive from robot_diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
rpoyner-tri committed Nov 13, 2024
1 parent 13fb5fe commit 3ed3f6a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions bindings/pydrake/planning/planning_py_robot_diagram.cc
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,7 @@ void DefinePlanningRobotDiagram(py::module m) {
cls_doc.scene_graph.doc_0args_nonconst)
.def("IsDiagramBuilt", &Class::IsDiagramBuilt,
cls_doc.IsDiagramBuilt.doc)
.def("Build", &Class::Build,
// Keep alive, ownership (tr.): `self` keeps `return` alive.
// Any prior reference access to our owned systems (e.g., plant())
// must remain valid, so the RobotDiagram cannot be destroyed
// until the builder (and all of its internal references) are
// finished.
py::keep_alive<1, 0>(), cls_doc.Build.doc);
.def("Build", &Class::Build, cls_doc.Build.doc);
}
};
type_visit(bind_common_scalar_types, CommonScalarPack{});
Expand Down

0 comments on commit 3ed3f6a

Please sign in to comment.