VecDMatch.generate constructor
Implementation
factory VecDMatch.generate(int length, DMatch Function(int i) generator, {bool dispose = true}) {
final pp = calloc<cvg.VecDMatch>()..ref.length = length;
pp.ref.ptr = calloc<cvg.DMatch>(length);
for (var i = 0; i < length; i++) {
final v = generator(i);
pp.ref.ptr[i] = v.ref;
if (dispose) v.dispose();
}
return VecDMatch.fromPointer(pp);
}