Menu

#1600 listbox itemconfigure causes a memory leak

obsolete: 8.4.4
closed-fixed
8
2003-11-11
2003-11-05
Anonymous
No

The following tcl program causes a memory leak. The
leak is because of the ".lst itemconfigure" lines:

proc start {} {
listbox .lst -background White -yscrollcommand
{.scrly set} -xscrollcommand {.scrlx set}
scrollbar .scrly -command {.lst yview}
scrollbar .scrlx -command {.lst xview} -orient
horizontal
grid columnconf . 0 -weight 1
grid rowconf . 0 -weight 1
grid .lst -in . -column 0 -row 0 -sticky swne
grid .scrly -in . -column 1 -row 0 -sticky ns
grid .scrlx -in . -column 0 -row 1 -sticky ew
bind .lst <<ListboxSelect>> {.lst selection clear 0
end}

for {set x 0} {$x<10000000} {incr x} {
for {set y 0} {$y<100} {incr y} {
.lst insert end "$x: iteration $y"
.lst itemconfigure $y -foreground #888888
.lst itemconfigure $y -selectbackground #4444ff
update
}
.lst delete 0 end
}
}

start

Discussion

  • Donal K. Fellows

    • priority: 5 --> 8
    • assigned_to: caflick --> hobbs
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    This might possibly be simple enough to hunt down.

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-11-11

    Logged In: YES
    user_id=72656

    corrected for 8.4.5 and 8.5a0

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2003-11-11
    • status: open --> closed-fixed