http://www.perlmonks.org?node_id=960536


in reply to Re^2: High memory consumption problem
in thread High memory consumption problem

Hello Monks, Also in support of the above output I am including the function block which the output refers. Please look at the following snippet where I have used Devel::FindRef. You will also find atleast 11 menus have been created by $contextmenu->add( ...) and hence it shows 11+1 = 12 refcounts. Please help.

sub TaskGenJobExecDisplay::_Menu () { my TaskGenJobExecDisplay $self = shift; my $contextMenu = $self->jobTree()->Menu( -tearoff => 0 ); $contextMenu->add( 'command', -label => 'Kill', -command => sub { $self->onMenuKill(@_) }, -font => $tool_config::FONT_BIG ); $contextMenu->add( 'command', -label => 'Delete', -command => sub { print TE "deleting jobs :$self \n";$sel +f->onMenuDelete(@_);weaken($self); $logger->info(Devel::FindRef::trac +k \$self); }, -font => $tool_config::FONT_BIG ); $contextMenu->add('separator'); $contextMenu->add( 'command', -label => 'Edit Profile', -command => sub { $self->onMenuEditProfile(@_) }, -font => $tool_config::FONT_BIG ); $contextMenu->add('separator'); $contextMenu->add( 'command', -label => 'Show Logfile', -command => sub { $self->onMenuShowLogfile(0) }, -font => $tool_config::FONT_BIG ); $contextMenu->add( 'command', -label => 'Show Logfile Sep. Window', -command => sub { $self->onMenuShowLogfile(1) }, -font => $tool_config::FONT_BIG ); $contextMenu->add('separator'); $contextMenu->add( 'command', -label => 'Restart', -command => sub { $self->onMenuRestart( @_, 0 ) }, -font => $tool_config::FONT_BIG ); $contextMenu->add( 'command', -label => 'Edit & Restart', -command => sub { $self->onMenuRestart( @_, 1 ) }, -font => $tool_config::FONT_BIG ); $contextMenu->add( 'command', -label => 'Restart (incl. predecessors)', -command => sub { $self->onMenuRestartWithPredecessors( @_, 0 +) }, -font => $tool_config::FONT_BIG ); $contextMenu->add('separator'); $contextMenu->add( 'command', -label => 'Unlock', -command => sub { $self->onMenuUnlock(@_) }, -font => $tool_config::FONT_BIG ); $contextMenu->add( 'command', -label => 'Force Ok', -command => sub { $self->onMenuForceStatus( @_, $communic +ation::OK ) }, -font => $tool_config::FONT_BIG ); $contextMenu->add( 'command', -label => 'Force failed', -command => sub { $self->onMenuForceStatus( @_, $communic +ation::ERROR ) }, -font => $tool_config::FONT_BIG );