Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-41771: [C++] Iterator releases its resource immediately when it re…
…ads all values (#41824) ### Rationale for this change `Iterator` keeps its resource (`ptr_`) until it's deleted but we can release its resource immediately when it reads all values. If `Iterator` keeps its resource until it's deleted, it may block closing a file. See GH-41771 for this case. ### What changes are included in this PR? Releases `ptr_` when `Next()` returns the end. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: #41771 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Benjamin Kietzman <bengilgit@gmail.com>
- Loading branch information