Skip to content

style: remove photolist from cardset_viewer as it is unused#564

Closed
vil02 wants to merge 1 commit intoshlomif:masterfrom
vil02:remove_photolist
Closed

style: remove photolist from cardset_viewer as it is unused#564
vil02 wants to merge 1 commit intoshlomif:masterfrom
vil02:remove_photolist

Conversation

@vil02
Copy link
Copy Markdown
Contributor

@vil02 vil02 commented Apr 11, 2026

photolist is nowhere referenced. I think it should be removed.

@vil02 vil02 marked this pull request as ready for review April 11, 2026 22:54
@joeraz
Copy link
Copy Markdown
Collaborator

joeraz commented Apr 14, 2026

It may not be referenced, but it does exist for a reason. The global photolist is written to hold references to every tkinter PhotoImage that gets created, so they remain alive, and don't get garbage collected. If it's removed, the image references will be lost when the show_cardset method finishes, and none of the images would show in the viewer.

So removing it would break the cardset viewer.

@vil02
Copy link
Copy Markdown
Contributor Author

vil02 commented Apr 14, 2026

Thanks for clarifying that.

@vil02 vil02 closed this Apr 14, 2026
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