-
Notifications
You must be signed in to change notification settings - Fork 789
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PyArrowConvert Leaks Memory #3683
Comments
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Feb 9, 2023
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Feb 9, 2023
|
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Mar 21, 2023
Remove ArrowArray::into_raw and try_from_raw
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Mar 21, 2023
Remove ArrowArray::into_raw and try_from_raw
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Mar 21, 2023
Remove ArrowArray::into_raw and try_from_raw
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Mar 21, 2023
Remove ArrowArray::into_raw and try_from_raw
tustvold
added a commit
to tustvold/arrow-rs
that referenced
this issue
Mar 21, 2023
Remove ArrowArray::into_raw and try_from_raw
tustvold
added a commit
that referenced
this issue
Mar 21, 2023
spebern
pushed a commit
to spebern/arrow-rs
that referenced
this issue
Mar 25, 2023
* Fix pyarrow memory leak (apache#3683) Remove ArrowArray::into_raw and try_from_raw * Update docs * Further deprecation * Clippy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
PyArrowConvert calls
ArrowArray::into_raw
to convert the contents ofArrowArray::empty
into raw pointers, it then passes these to python to populate, before passing them toArrowArray::try_from_raw
. This copies the memory contents and does not take ownership of the passed pointers, this appears to have been a change made in (#1449) by @viirya. The result is that the allocation ofArc<FFI_ArrowSchema>
andArc<FFI_ArrowArray>
is never freed.Some of the memory leaks appear to have been fixed in #1878 but not the ones present in the python interface.
I happen to think the
into_raw
method is extremely hard to use correctly, and I would propose removing it in favor of an interface that does not yield ownership of the pointers.To Reproduce
Expected behavior
Additional context
The text was updated successfully, but these errors were encountered: