-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi
Description
The native API (dart_api.h) exposes persistent handles to native code through pointers. We should add support to the FFI to creating persistent handles in dart (as ffi.Pointers) which can be passed back into native calls. This would be useful, for example, for passing state through native callbacks.
I imagine the API would look something like:
abstract class PersistentHandle extends Pointer<Void> {
PersistentHandle(Object target) native "...";
Object get target native "...";
set target(Object val) native "...";
void destroy() native "...";
}ds84182 and jianzhongli
Metadata
Metadata
Assignees
Labels
area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-ffi