IDLE is written in python and is probably keeping a reference to the objects for longer so they don't show up as being garbage collected.
I think it might be more accurate to say IDLE is written in tkinter and that is what is holding a reference to the objects in memory.
I think it might be more accurate to say IDLE is written in tkinter and that is what is holding a reference to the objects in memory.