Skip to content

Conversation

@serhiy-storchaka
Copy link
Member

@serhiy-storchaka 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 serhiy-storchaka added the type-bug An unexpected behavior, bug, or error label Sep 25, 2018
@zhangyangyu
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.

@serhiy-storchaka
Copy link
Member Author

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

@serhiy-storchaka 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