Menu

#2859 canvas itemconfigure memory leak - Tk_Uid

obsolete: 8.5.9
open
6
2010-11-16
2010-11-15
No

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.

Discussion

  • Jeffrey Hobbs

    Jeffrey Hobbs - 2010-11-15

    script demonstrating memory leak per 'run'

     
  • Jan Nijtmans

    Jan Nijtmans - 2010-11-16

    Just a wild guess: color options in Canvas are handled as Tk_Uid, so this doesn't surprise me.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2010-11-16
    • priority: 8 --> 7
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2010-11-16

    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.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2010-11-16

    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.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2010-11-16
    • priority: 7 --> 6
    • summary: canvas itemconfigure memory leak --> canvas itemconfigure memory leak - Tk_Uid
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.