Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove reference counting #97

Open
Berstanio opened this issue Jan 25, 2025 · 0 comments
Open

Remove reference counting #97

Berstanio opened this issue Jan 25, 2025 · 0 comments
Assignees

Comments

@Berstanio
Copy link
Contributor

Currently the GCHandler tries to keep count of the amount of references for the same pointer, so no double free occure. This was mainly introduced for address reinterpretation methods like StructPointer#asStackElement.
However, the counting of the pointer references is just way to slow. A better approach is, to be able to set a "parent" for a pointer. Only the parent pointer is registered to GC, but all childs are holding strong references to their parent.
This allows to keep the pointer allive, until all children are collected.

@Berstanio Berstanio self-assigned this Jan 25, 2025
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

No branches or pull requests

1 participant