-
Notifications
You must be signed in to change notification settings - Fork 41
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
Standardize Usage / Interface for raw and smart pointer usage #43
Comments
There are a few cases of interest here. In both cases I suggest that we follow the google style guide for C++.
|
shared_ptr
usage
I agree with 2 and 3. However, on reading google's doc on reference arguments, I don't see a |
I believe that the caller is responsible for managing the object lifetime. This method of handling output arguments is also suggested by the ROS style guide. If the function is creating an object with a non-trivial lifetime, then we should return a unique pointer to the object. |
Right now pointers are both raw and shared. We should choose one (preferably shared) and stick with it. Additionally, we should consistently return shared pointers rather than passing them in by reference and populating them.
The text was updated successfully, but these errors were encountered: