Skip to content

[feature] Modernise manual memory management in range_image_border_extractor #3801

@kunaltyagi

Description

@kunaltyagi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions