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
Logged In: YES
user_id=79902
This might possibly be simple enough to hunt down.
Logged In: YES
user_id=72656
corrected for 8.4.5 and 8.5a0