Use a single upcall for all ToggleRefFinalizers (fixes #223) #227
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi!227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-223"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I'm still not sure why the CodeHeap isn't cleaned up, but the cause is the
ToggleRefFinalizergenerating a new upcall stub every time it needs to be run. I Switched that to use a global upcall, passing in theMemorySegment. Now I no longer see the issue.This is awesome! Thanks a lot!
Reusing the upcall stub should also improve performance in general, because
g_object_remove_toggle_refusually runs very often.