Skip to content

Replace raw Observer* by a shared ptr as part of world.#3732

Open
MARIANOCEREDA wants to merge 1 commit into
moveit:mainfrom
MARIANOCEREDA:main
Open

Replace raw Observer* by a shared ptr as part of world.#3732
MARIANOCEREDA wants to merge 1 commit into
moveit:mainfrom
MARIANOCEREDA:main

Conversation

@MARIANOCEREDA
Copy link
Copy Markdown

@MARIANOCEREDA MARIANOCEREDA commented May 21, 2026

Description

As mentioned in #860 , this aims to start removing raw pointers, and replace them by smart pointers.
In particular, this PR removes the Observer* ptr from world.hpp and replaces it with:

  • A definition as a std::vector<std::shared_ptr<Observer>> in the World object, which owns the observers.
  • A definition as a std::weak_ptr<Observer> in the ObserverHandle object, which accesses the object.

Checklist

  • Required by CI: Code is auto formatted using clang-format
  • Extend the tutorials / documentation reference
  • Document API changes relevant to the user in the MIGRATION.md notes
  • Create tests, which fail without this PR reference
  • Include a screenshot if changing a GUI
  • While waiting for someone to review your request, please help review another open pull request to support the maintainers

@MARIANOCEREDA MARIANOCEREDA marked this pull request as ready for review May 21, 2026 21:54
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

Successfully merging this pull request may close these issues.

1 participant