##################################### #!/usr/bin/perl use warnings; use strict; use Tk; #no leaks, but watch out for @array being empty...crash #make sure @array has at least a ''; my $mw = Tk::MainWindow->new(-title => 'Listbox Leak'); my @array = (1..10000); my $lb = $mw->Listbox( -listvariable=> \@array, )->pack(); my $b = $mw->Button(-text => 'Leak', -command => \&leak )->pack(); MainLoop; sub leak { @array = map{"$_.a"}(1..10000); $lb->update; }