Skip to content

Conversation

@atta-ullah01
Copy link
Contributor

Summary of Changes

Replaced raw pointer arrays allocated with new[] and released with delete[] by std::vector in Subdivision_method_3 and Matrix_search.

This transition to RAII (Resource Acquisition Is Initialization) ensures automatic memory management and exception safety for temporary buffers used in:

  • Subdivision_method_3: PQQ_1step, PTQ_1step, DQQ_1step, and Sqrt3_1step internal host implementations.
  • Matrix_search: monotone_matrix_search implementation.

Logic using pointer arithmetic was preserved by utilizing std::vector::data().

Release Management

  • Affected package(s): Subdivision_method_3, Matrix_search
  • Issue(s) solved (if any):
  • Feature/Small Feature (if any):
  • Link to compiled documentation (obligatory for small feature):
  • License and copyright ownership: I confirm that I have the right to contribute these changes.

Replace raw pointer allocations with std::vector in Subdivision_method_3
and Matrix_search for improved memory safety.

Affected package(s): Subdivision_method_3, Matrix_search
Copy link
Member

@lrineau lrineau left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution.

@sloriot
Copy link
Member

sloriot commented Jan 14, 2026

Successfully tested in CGAL-6.2-Ic-82

@sloriot sloriot merged commit a2144bd into CGAL:main Jan 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants