Skip to content
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

Cope with numpy memleak (e.g. np.array([1,2,3]) < 1) #168

Merged
merged 1 commit into from
Aug 28, 2023

Conversation

mknkmyzk
Copy link
Contributor

memleak with numpy
e.g.

require 'pycall/import'
include PyCall::Import

# require 'numpy'
# np = Numpy
pyimport :numpy, as: :np

zzz = np.zeros(1000000)
10000.times{
  zzz[zzz == 255] = 0   # mem leak !!
  zzz > 100             # mem leak !!
  gc.collect()
  GC.start
}

@mrkn
Copy link
Owner

mrkn commented Aug 28, 2023

@mknkmyzk Thank you very much!

@mrkn mrkn linked an issue Aug 28, 2023 that may be closed by this pull request
@mrkn mrkn merged commit 799205d into mrkn:master Aug 28, 2023
31 checks passed
@mknkmyzk mknkmyzk deleted the memleak_numpy branch August 29, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak with numpy
2 participants