native icon indicating copy to clipboard operation
native copied to clipboard

Test that NativeFinalizer is actually invoked.

Open mahesh-hegde opened this issue 1 year ago • 4 comments

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 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

mahesh-hegde avatar Apr 22 '23 09:04 mahesh-hegde