Skip to content
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

Remove raw pointer interface #197

Open
bpwilcox opened this issue May 12, 2022 · 2 comments
Open

Remove raw pointer interface #197

bpwilcox opened this issue May 12, 2022 · 2 comments

Comments

@bpwilcox
Copy link

There have been a few issues already referencing the known memory leak in this code with the metaobjects.
#131
ros/pluginlib#126

In #186 to potentially resolve these memory leaks, @hidmic mentioned a goal to remove the raw pointer interface from the existing code. #186 (review). As humble will soon be released, I wanted to create this ticket to formally track this effort.

Was there a reason or limitation for not using smart pointers (e.g. a smart pointer for AbstractMetaObjectBase in the FactoryMap / graveyard MetaObjectVector)?

@tylerjw
Copy link

tylerjw commented Jun 7, 2022

It would be really nice if this was fixed and a CI job added to test class_loader (and pluginlib) with ASAN to defend it against this coming back. @v4hn commented here about it: #131 (comment)

Without a tool like ASAN and tests, any software like this that does manual memory management is doomed to have memory errors unless the authors of the software are prefect. Here is an example of a memory error in rclcpp I also discovered today by trying to use asan in my project's CI that depends on these various tools in the ros ecosystem: ros2/rclcpp#1948

To error is human, to write tests and use sanitizers is to have compassion for your users.

@v-lopez
Copy link

v-lopez commented Aug 5, 2022

+1, we try to have asan on our code, and are limited to having to deal with these leaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants