The attached script indicates a memory leak with canvas itemconfigure (possibly with just color handling). Memory leak seen on both Windows and Linux. This was first reported via Tkinter-discuss list.
Ah, I had ruled out the Tk_Uid of canvas items, not realizing that colors themselves where Tk_Uids as well. Each random color would have a new memory element, but only once per instance of that color.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Reconfirmed for my aging memory that Tk_GetColor is Tk_Uid based (layered over XIds). We'd have to add new core APIs to get around this. See tkColor.c.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
script demonstrating memory leak per 'run'
Just a wild guess: color options in Canvas are handled as Tk_Uid, so this doesn't surprise me.
Ah, I had ruled out the Tk_Uid of canvas items, not realizing that colors themselves where Tk_Uids as well. Each random color would have a new memory element, but only once per instance of that color.
Reconfirmed for my aging memory that Tk_GetColor is Tk_Uid based (layered over XIds). We'd have to add new core APIs to get around this. See tkColor.c.