elementAt method

  1. @override
Task elementAt(
  1. int index
)
override

List object owns the elements, and objects returned by this method hold onto the list object ensuring the pointed to element isn/t dropped.

Implementation

@override
Task elementAt(int index) {
  final address = _api._ffiListTaskElementAt(_box.borrow(), index);
  final reference = _Box(
    _api,
    ffi.Pointer.fromAddress(address),
    "drop_box_Leak",
    context: this,
  );
  return Task._(_api, reference);
}