Skip to content

Make MATLAB handle deletion idempotent - #201

Merged
ProfFan merged 1 commit into
codex/pybind-direct-function-pointersfrom
codex/idempotent-matlab-delete
Aug 22, 2026
Merged

Make MATLAB handle deletion idempotent#201
ProfFan merged 1 commit into
codex/pybind-direct-function-pointersfrom
codex/idempotent-matlab-delete

Conversation

@ProfFan

@ProfFan ProfFan commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • delete generated MATLAB native handles only while their pointer remains collector-owned
  • make repeated explicit or automatic destruction a no-op instead of a double free
  • add regression coverage and refresh generated C++ snapshots

Validation

  • python3 -m unittest tests.test_matlab_wrapper (14 passed)
  • python3 -m pytest -q -o addopts='' tests (126 passed on the rebased branch)
  • regenerated and rebuilt the GTSAM bindings with Octave
  • verified both delete(v); clear v and delete(v); delete(v); clear v exit successfully
  • confirmed generated MATLAB sources are byte-for-byte identical before and after rebasing onto codex/pybind-direct-function-pointers

@ProfFan
ProfFan force-pushed the codex/idempotent-matlab-delete branch from e727529 to 05ef602 Compare August 22, 2026 03:58
@ProfFan
ProfFan changed the base branch from master to codex/pybind-direct-function-pointers August 22, 2026 03:58
@ProfFan
ProfFan merged commit 0a74b36 into master Aug 22, 2026
8 checks passed
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.

2 participants