Skip to content

Fix DictSupplementaryFileContainer: refcount never incremented, delete_file never frees memory#513

Open
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
rwth-iat:fix/b2-aasx-refcount
Open

Fix DictSupplementaryFileContainer: refcount never incremented, delete_file never frees memory#513
zrgt wants to merge 1 commit intoeclipse-basyx:developfrom
rwth-iat:fix/b2-aasx-refcount

Conversation

@zrgt
Copy link
Copy Markdown
Contributor

@zrgt zrgt commented May 5, 2026

Fixes #495

Changes

  • _assign_unique_name: increment _store_refcount[sha] when creating a new _name_map entry (first loop branch) — without this, count stays at 0 and delete_file's == 0 check never triggers
  • rename_file: decrement _store_refcount[file_hash] when removing the old name entry from _name_map, consistent with delete_file behavior
  • Add test_supplementary_file_container_refcount — verifies backing store is freed only after the last reference is deleted

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.

1 participant