Skip to content

Replace CCShareable with shared pointers - #138

Merged
dgirardeau merged 3 commits into
masterfrom
dgirardeau-replace-ccshareable
Sep 28, 2026
Merged

dgirardeau merged 3 commits into
masterfrom
dgirardeau-replace-ccshareable

Conversation

@dgirardeau

Copy link
Copy Markdown
Member

Replace the intrusive CCShareable reference-counting model with standard std::shared_ptr ownership for scalar fields.

PointCloudTpl now shares scalar fields through std::shared_ptr, and temporary scalar fields in registration and processing tools use std::make_shared. Borrowed raw pointers remain at algorithm boundaries, preserving the existing public call patterns. The obsolete scalar-field garbage specialization and CCShareable sources/install entries are removed.

Validation: clean CMake Release build with MSVC, with Qt Concurrent and CGAL disabled.

@dgirardeau
dgirardeau force-pushed the dgirardeau-replace-ccshareable branch 2 times, most recently from ff68eb8 to 738ffb1 Compare September 27, 2026 21:57
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@dgirardeau
dgirardeau force-pushed the dgirardeau-replace-ccshareable branch from 738ffb1 to 9b89f58 Compare September 27, 2026 22:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Public borrowed-pointer compatibility, header completeness, and virtual destruction issues remain unresolved.

Review effort: Lite
Findings: 1 High severity · 2 Medium severity

Open (3)
What changed in this PR

Replaces intrusive CCShareable scalar-field ownership with std::shared_ptr across point clouds and processing tools.

Changes:

  • Migrates scalar-field storage and temporary allocations to shared pointers.
  • Updates registration and distance-field interfaces.
  • Removes obsolete CCShareable and garbage-management infrastructure.
File Description
src/​ScalarFieldTools.cpp Uses shared gradient storage.
src/​RegistrationTools.cpp Migrates temporary scalar fields.
src/​CMakeLists.txt Removes obsolete source registration.
src/​CCShareable.cpp Removes obsolete implementation.
src/​AutoSegmentationTools.cpp Uses shared distance storage.
include/​ScalarField.h Defines shared ownership for scalar fields.
include/​RegistrationTools.h Updates registration weight fields.
include/​PointCloudTpl.h Stores scalar fields using shared pointers.
include/​Garbage.h Removes scalar-field garbage specialization.
include/​DistanceComputationTools.h Updates split-distance fields.
include/​CMakeLists.txt Removes obsolete header installation.
include/​CCShareable.h Removes obsolete interface.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread include/RegistrationTools.h
Comment thread include/DistanceComputationTools.h Outdated
Comment thread include/ScalarField.h Outdated
@dgirardeau
dgirardeau merged commit 8f83c8b into master Sep 28, 2026
8 checks passed
@dgirardeau
dgirardeau deleted the dgirardeau-replace-ccshareable branch September 28, 2026 16:16
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.

3 participants