Skip to content

Replace Finalizer with ffi.NativeFinalizer #20

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

Closed
rainyl opened this issue Apr 7, 2024 · 0 comments · Fixed by #21
Closed

Replace Finalizer with ffi.NativeFinalizer #20

rainyl opened this issue Apr 7, 2024 · 0 comments · Fixed by #21
Assignees

Comments

@rainyl
Copy link
Owner

rainyl commented Apr 7, 2024

In the refactoring of #13, I replaced all ffi.NativeFinalizer with Finalizer because I thought they are the same, at least ensuring native resources are correctly freed, but memory leaks were observed when testing.

So, after googling, I found that according to dart-lang/sdk#52436 , they are different and we should use ffi.NativeFinalizer insted of Finalizer.

@rainyl rainyl self-assigned this Apr 7, 2024
@rainyl rainyl closed this as completed in #21 Apr 7, 2024
rainyl added a commit that referenced this issue Apr 7, 2024
Replace Finalizable with ffi.NativeFinalizable to fix #20
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 a pull request may close this issue.

1 participant