| 548 | }; |
| 549 | |
| 550 | void ReleaseExportedArray(struct ArrowArray* array) { |
| 551 | if (ArrowArrayIsReleased(array)) { |
| 552 | return; |
| 553 | } |
| 554 | for (int64_t i = 0; i < array->n_children; ++i) { |
| 555 | struct ArrowArray* child = array->children[i]; |
| 556 | ArrowArrayRelease(child); |
| 557 | DCHECK(ArrowArrayIsReleased(child)) |
| 558 | << "Child release callback should have marked it released"; |
| 559 | } |
| 560 | struct ArrowArray* dict = array->dictionary; |
| 561 | if (dict != nullptr) { |
| 562 | ArrowArrayRelease(dict); |
| 563 | DCHECK(ArrowArrayIsReleased(dict)) |
| 564 | << "Dictionary release callback should have marked it released"; |
| 565 | } |
| 566 | DCHECK_NE(array->private_data, nullptr); |
| 567 | auto* pdata = reinterpret_cast<ExportedArrayPrivateData*>(array->private_data); |
| 568 | delete pdata; |
| 569 | |
| 570 | ArrowArrayMarkReleased(array); |
| 571 | } |
| 572 | |
| 573 | struct ArrayExporter { |
| 574 | explicit ArrayExporter(bool device_interface = false) |
nothing calls this directly
no test coverage detected