Skip Menu |

This queue is for tickets about the Tk-MListbox CPAN distribution.

Report information
The Basics
Id: 12435
Status: new
Priority: 0/
Queue: Tk-MListbox

Owner: Nobody in particular
Requestors: ken.prows [...]

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)


Subject: MListbox memory leaks
Download (untitled) / with headers
text/plain 616b
This is happening with Tk::MListbox 1.11. I tested it on Fedora Core 2 and Windows 2000. I am observing memory leak when using MListbox. The leak happens both when deleting/re-inserting the list and when sorting. I monitored the memory leak by using "top" in Linux and using the task manager in Win2k. The memory seems to go up by the same amount every time. I could not find the source of this problem. The problem may lie in Tk::Listbox itself and not MListbox, I can't say for sure. The attached script demonstrates the problem. Everytime the button is clicked or the column is sorted, the script leaks memory.
text/x-perl 597b
#!/usr/bin/perl -w use strict; use Tk; use Tk::MListbox; my $mw = Tk::MainWindow->new(-title => 'MListbox Leak'); my $b = $mw->Button(-text => 'Leak', -command => \&leak)->pack(-side=>'bottom'); my $mlb = $mw->Scrolled('MListbox', -scrollbars=>'se', -selectmode=>'extended',) ->pack(-expand=>'true', -fill=>'both', -side=>'top',); $mlb->columnInsert('end', -text=>'Test'); #setup the initial indices for(1..10000) { $mlb->insert('end',[$_]); } MainLoop; sub leak { $mlb->delete(0,'end'); for(0..10000){ $mlb->insert($_,[$_]); } $mlb->update; }

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to