File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
rclcpp/include/rclcpp/executors Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ namespace executors
4040 *
4141 * Timers management
4242 * This class provides APIs to add and remove timers.
43- * This class keeps ownership of the added timers through a shared pointer.
43+ * It keeps a list of weak pointers from added timers, and owns them only when
44+ * have expired and need to be executed.
4445 * Timers are kept ordered in a binary-heap priority queue.
4546 * Calls to add/remove APIs will temporarily block the execution of the timers and
4647 * will require to reorder the internal priority queue of timers.
@@ -73,8 +74,9 @@ class TimersManager
7374 ~TimersManager ();
7475
7576 /* *
76- * @brief Adds a new TimerBase to the storage.
77- * This object will keep ownership of the timer.
77+ * @brief Adds a new TimerBase::WeakPtr to the storage.
78+ * This object will store a weak pointer of the added timer
79+ * in a heap data structure.
7880 * @param timer the timer to be added
7981 */
8082 void add_timer (rclcpp::TimerBase::SharedPtr timer);
You can’t perform that action at this time.
0 commit comments