PointCloudLibrary / PointCloudLibrary/pcl
[feature] Modernise manual memory management in `range_image_border_extractor`
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
Context
Manual memory management can be replaced by automatic management providing better move and copy semantics.
Expected behavior
Please tell us how the situation should be instead
Describe the solution you'd like
Replacing the pointers to pointers with something like std::vector<T> or std::unique_ptr<T>, where T is std::unique_ptr<U> or U* or U[].
LocalSurface** surface_structure_;
PointCloudOut* border_descriptions_;
ShadowBorderIndices** shadow_border_informations_;
Eigen::Vector3f** border_directions_;
There are other such opportunities in this class.
unique_ptr
Keeps ABI, beneficial for constant size arrays (runtime allocated)
vector
Might fit usage semantics better (eg: resizing), breaks ABI
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the range_image_border_extractor class and its uses of surface_structure_, border_descriptions_, shadow_border_informations_, and border_directions_. Review how these members are allocated, copied, moved, resized, and destroyed, then determine whether unique_ptr or vector fits each use while preserving ABI where required. Done means the class no longer relies on the identified manual pointer management and its existing behavior remains covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100