Commit e332733
authored
fix(arrow/cdata): make nativeCRecordBatchReader deterministic (#793)
### Rationale for this change
Instead of relying on a finalizer, make the `nativeCRecordBatchReader`
use atomic Retain and Release to make releasing deterministic.
### What changes are included in this PR?
Remove the finalizer, call C.ArrowArrayRelease and
C.ArrowArrayStreamRelease based on refcount.
### Are these changes tested?
Yes, tests cover this already.
### Are there any user-facing changes?
Only that retain and release now properly control the determinism of
releasing the C memory instead of relying on a finalizer.1 parent 2b2aa6b commit e332733
2 files changed
Lines changed: 38 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
56 | 58 | | |
57 | 59 | | |
58 | 60 | | |
| |||
903 | 905 | | |
904 | 906 | | |
905 | 907 | | |
| 908 | + | |
906 | 909 | | |
907 | 910 | | |
908 | 911 | | |
909 | | - | |
910 | | - | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | | - | |
916 | | - | |
917 | | - | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
918 | 921 | | |
919 | 922 | | |
920 | 923 | | |
| |||
940 | 943 | | |
941 | 944 | | |
942 | 945 | | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
943 | 953 | | |
944 | 954 | | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
949 | 972 | | |
950 | 973 | | |
951 | 974 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
192 | 193 | | |
193 | 194 | | |
| 195 | + | |
194 | 196 | | |
195 | 197 | | |
196 | 198 | | |
| |||
0 commit comments