Test that NativeFinalizer is actually invoked.
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
This was originally a checkbox under dart-lang/native#669 . But I think this deserves separate issue.
Have to verify the `NativeFinalizer` is actually invoked when GC is invoked.
We should either
* Mock the finalizer in this test
* How?
* Associate an atomic counter or keep some other metric in `dartjni.so`
[https://github.com/dart-lang/ffigen/blob/master/test/native_objc_test/automated_ref_count_test.dart](this) is the test Liam mentioned in a previous discussion but I don't think this counter-decrease-on-delete pattern is applicable in Java.
* On Android, `Dart_ExecuteInternalCommand` symbol does not exist
* Is there another way to trigger GC on Android?
cc:
@liamappelbe
@dcharkes
Contributor guide
Assessment
This issue has not been assessed yet.