[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light
/ cpython Public

[2.7] bpo-34794: Fix a memory leak in Tkinter.Image. #9559

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

Closed

Conversation

Copy link
Member

serhiy-storchaka commented Sep 25, 2018

A Tcl object was leaked when set the data or maskdata options.

https://bugs.python.org/issue34794

A Tcl object was leaked when set the data or maskdata options.
serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Sep 25, 2018
Copy link
Member

According to https://www.tcl.tk/man/tcl/TclLib/ByteArrObj.html, the result of Tcl_NewByteArrayObj is of zero reference count. It looks to me the problem seems to exist in AsObj. AsObj returns a tcl object with zero reference count in other cases, but when the arg is a PyTclObject, it increases another reference count which seems redundant to me. I am not familiar with the code and correct me if I am wrong.

Copy link
Member Author

Thank you @zhangyangyu. Your analysis is absolutely correct. Opened #10025 for the new fix.

serhiy-storchaka deleted the tkinter-image-data-leak branch October 21, 2018 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting merge type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants