Open AliAshkaniNia opened 11 months ago
I'm not all familiar with the polymorphic allocators, but if they end up being a simpler alternative I think that would be welcome. If you'd like to submit a PR with that change, we are happy to take a look at it.
I recently reviewed the Implementing a custom memory allocator section and wanted to provide a friendly suggestion. While the
MyAllocator
implementation works well for C++11, ROS 2 also supports C++17 polymorphic memory allocators which offer a simpler alternative. I believe adding examples using the polymorphic allocators could make this section more beginner-friendly.I am prepared to provide a minimum working example and make the necessary modifications to the documentation. Please let me know if there are any particular reasons for not including this approach in the tutorial already, or if you think it would be valuable to add as an additional option.