Skip to content

relation: clear digraph scratch pointers - #117

Open
ydah wants to merge 1 commit into
akimd:masterfrom
ydah:fix/relation-digraph-state-cleanup
Open

ydah wants to merge 1 commit into
akimd:masterfrom
ydah:fix/relation-digraph-state-cleanup

Conversation

@ydah

@ydah ydah commented Sep 1, 2026

Copy link
Copy Markdown

relation_digraph() stores the input bitset vector in the static F pointer and updates the pointed-to bitsets directly while traversing the relation.

The final function = F assignment only writes to a by-value parameter and therefore has no effect on the caller. Remove this dead assignment.

Also clear indexes and vertices after freeing them, and clear the borrowed R and F pointers before returning, so the static state does not retain stale or dangling pointers.

The transitive-closure behavior is unchanged because the caller's bitsets are modified in place.

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