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