Skip to content

Commit

Permalink
Fix memory leak. (#828)
Browse files Browse the repository at this point in the history
* Fix memory leak.

Signed-off-by: Lei Liu <[email protected]>

Co-authored-by: Chen Lihui <[email protected]>
Co-authored-by: Abrar Rahman Protyasha <[email protected]>
  • Loading branch information
3 people authored Sep 30, 2021
1 parent 691e4fb commit ac13665
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions rclpy/src/rclpy/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ Client::take_response(py::object pyresponse_type)
result_tuple[0] = header;

result_tuple[1] = convert_to_py(taken_response.get(), pyresponse_type);
// result_tuple now owns the message
taken_response.release();

return result_tuple;
}
Expand Down
1 change: 0 additions & 1 deletion rclpy/src/rclpy/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ Service::service_take_request(py::object pyrequest_type)

result_tuple[1] = header;
result_tuple[0] = convert_to_py(taken_request.get(), pyrequest_type);
taken_request.release();

return result_tuple;
}
Expand Down

0 comments on commit ac13665

Please sign in to comment.