RefUpdate2<V> method

V RefUpdate2<V>(
  1. X? o,
  2. V fn(
    1. Pointer<T> p
    )
)

Allocates o into slot '2', calls fn with the pointer, then syncs native memory back into o via setCFunc.

Use this instead of Ref2 when the C function writes into the struct and you want the mutations reflected in o after the call.

Implementation

V RefUpdate2<V>(X? o, V Function(Pointer<T> p) fn) => _RefUpdate$(o, fn, Ref2);