cvdRef property

CvSize get cvdRef

The struct value to pass to a native function, on the Dart heap.

Use it instead of cvd.ref: that takes a view of the native memory of a temporary wrapper, which a GC can free (through its finalizer) before the call copies the struct, and the native code then reads freed memory.

Implementation

cvg.CvSize get cvdRef => ffi.Struct.create<cvg.CvSize>()
  ..width = this.$1
  ..height = this.$2;