Skip to content

Remove raw pointer interface #197

Open

Description

@bpwilcox

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)?

Activity

  1. tylerjw commented on Jun 7, 2022

    @tylerjw
    Contributor

    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.

  2. v-lopez commented on Aug 5, 2022

    @v-lopez

    +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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions