ArrowCData.owned constructor

ArrowCData.owned(
  1. ArrowCBridge _bridge,
  2. Pointer<CArrowArray> array,
  3. Pointer<CArrowSchema> schema
)

Internal transport constructor; applications obtain instances from Polars.

Implementation

ArrowCData.owned(this._bridge, this.array, this.schema) {
  Object? arrayAttachment;
  try {
    arrayAttachment = _bridge.attachArray(this, array);
    _arrayAttachment = arrayAttachment;
    _schemaAttachment = _bridge.attachSchema(this, schema);
  } catch (_) {
    _bridge.deleteSchema(null, schema);
    _bridge.deleteArray(arrayAttachment, array);
    rethrow;
  }
}