MCPcopy Create free account
hub / github.com/apache/arrow / ReleaseExportedArray

Function ReleaseExportedArray

cpp/src/arrow/c/bridge.cc:550–571  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548};
549
550void 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
573struct ArrayExporter {
574 explicit ArrayExporter(bool device_interface = false)

Callers

nothing calls this directly

Calls 3

ArrowArrayIsReleasedFunction · 0.85
ArrowArrayReleaseFunction · 0.85
ArrowArrayMarkReleasedFunction · 0.85

Tested by

no test coverage detected