From 3ed3f6a7b2b17b0e359fc19ff8066e371746647d Mon Sep 17 00:00:00 2001 From: Rick Poyner Date: Thu, 7 Nov 2024 18:10:59 -0500 Subject: [PATCH] wip: remove excessive keep_alive from robot_diagram --- bindings/pydrake/planning/planning_py_robot_diagram.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/bindings/pydrake/planning/planning_py_robot_diagram.cc b/bindings/pydrake/planning/planning_py_robot_diagram.cc index 97fe087005af..22b272425700 100644 --- a/bindings/pydrake/planning/planning_py_robot_diagram.cc +++ b/bindings/pydrake/planning/planning_py_robot_diagram.cc @@ -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{});