elementAt method

  1. @override
UserProfile 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
UserProfile elementAt(int index) {
  final address = _api._ffiListUserProfileElementAt(_box.borrow(), index);
  final reference = _Box(
    _api,
    ffi.Pointer.fromAddress(address),
    "drop_box_Leak",
    context: this,
  );
  return UserProfile._(_api, reference);
}