Skip to content

Conversation

@ghzdude
Copy link
Contributor

@ghzdude ghzdude commented Jun 18, 2025

What

Refactors the neighbor cache to use a list of weak references instead of an array with direct references

Implementation Details

add NULL and INVALID weak references to mimic previous logic.
if INVALID, the neighbor should be recomputed, otherwise either the TE or null should be returned
It also needs to be checked that the neighbors are not null unexpectedly due to referent being lost somehow

Outcome

Theoretically, references to neighboring TEs should be GC'd properly now.

@ghzdude ghzdude requested a review from a team as a code owner June 18, 2025 08:21
@ghzdude ghzdude added the type: refactor Suggestion to refactor a section of code label Jun 18, 2025
move comment to more appropriate place
mark certain methods as not null
@Zorbatron Zorbatron merged commit 41f3711 into master Aug 7, 2025
3 checks passed
@Zorbatron Zorbatron deleted the gh/weak-ref-neighbors branch August 7, 2025 23:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: refactor Suggestion to refactor a section of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants