I have a program that displays many tkinter PhotoImages at once (relevant: I'm not using PIL). It currently has several screens, and when the play gets to the edge it loads a new tilemap, creating a bunch more photoimages in the currentTiles array after clearing the old contents. I'm fairly certain there are no other references to these photoimages in the rest of the program.
The weird thing is that when I print the contents of the last item in the array after the loadLevel function is called, it says things such as "pyimage3761", and it increments each time I load a new screen. Is this due to tkinter keeping track of how many have been created so far, or is it because the old tiles are still in memory? I can't for the life of me figure out where there could be another reference, so I'm just wondering if there are any other possibilities before I spend hours looking for errors.
Thanks!!
Every created image is assigned a unique name (unless you specify the name of the image when creating). This unique name is generated  by using a counter, which increases monotonically.
Tkinter PhotoImage: References in Memory?