-
Notifications
You must be signed in to change notification settings - Fork 418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dashing backport] Fixed "memory leak" in action clients (#920) #934
Conversation
@ivanpauno mind signing off the cherry-picked commit? I think |
Whenever a call is made to `rclcpp_action::Client::wait_for_action_server` a weak pointer to an Event object gets added to the graph_event_ vector of the NodeGraph interface. This vector will be cleared on a node graph change event, but if no such event occurs the weak pointer will be stuck in the vector. Furthermore, if client code issues repeated calls to `wait_for_action_server` the vector will keep growing. The fix moves the Event object creation right after the early return from `wait_for_action_server` so that the Event object is not created in the case that the server is known to be present and therefore there is no need to wait for a node graph change event to occur. Signed-off-by: Adrian Stere <astere@clearpath.ai> Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
29234b3
to
8332e15
Compare
@ros-pull-request-builder retest this please |
1 similar comment
@ros-pull-request-builder retest this please |
@nuclearsandwich are these known flaky tests on the
|
See the history of the It also had the failing tests but a retrigger passed green - so it looks like a flaky test. |
Similar to ros2/build_farmer#184, though it's failing in another part of the test. I don't remember those failures, but it seems to be completely unrelated to this patch. |
CI looks good. Merging so I can make a release. |
Backport of #920.