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

Yet Another memleak with str(list) #169

Merged
merged 1 commit into from
Sep 9, 2023
Merged

Conversation

mknkmyzk
Copy link
Contributor

Sorry, I found another memleak.

e.g.

require 'pycall/import'
include PyCall::Import

pyimport :gc

yyy = PyCall.eval("[0] * 1000000")
zzz = PyCall::List.(PyCall.eval("range(1000000)"))
1000000.times{
  yyy.to_s  # memleak
  zzz.to_s  # memleak
  PyCall.eval("'0' * 1000000") # memleak
  PyCall::LibPython::Helpers.str(zzz.__pyptr__) # memleak

  gc.collect()
  GC.start
}

@mrkn
Copy link
Owner

mrkn commented Sep 9, 2023

@mknkmyzk Thank you very much!!

@mrkn mrkn merged commit 81360ac into mrkn:master Sep 9, 2023
31 checks passed
@mknkmyzk mknkmyzk deleted the str_memleak branch September 11, 2023 01:06
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.

2 participants