Skip to content

Memory management #17

Answered by rainyl
gau-nernst asked this question in Q&A
Apr 3, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Yes, memory management is very important when interacting to native codes, but thanks to dart team, they provided ffi.Finalizable interface to attach a native resource to a dart class, so when the attached dart class is freed by GC, the native resources will also be freed, so generally you needn't to worry about it, but when I tested in pure dart, it seems GC won't triggered correctly and memory increased constantly, but in flutter GC was triggered and worked fine. Also, I admit that there must be some incorrectly management on native resources, if you occured a memory leak, please open an issue.

I recommed you use the new comming v1.0.0 version, now it is not published and you can find m…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@gau-nernst
Comment options

@rainyl
Comment options

@gau-nernst
Comment options

Answer selected by gau-nernst
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants