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.