Reduce Memory leaks
This commit is contained in:
parent
e24d5bf4da
commit
8d2e155552
3 changed files with 10 additions and 57 deletions
|
@ -1,6 +1,5 @@
|
||||||
package C4::Interface::FlagsCDK; #asummes C4/Interface/FlagsCDK
|
package C4::Interface::FlagsCDK; #asummes C4/Interface/FlagsCDK
|
||||||
|
|
||||||
#uses Newt
|
|
||||||
use C4::Format;
|
use C4::Format;
|
||||||
use C4::InterfaceCDK;
|
use C4::InterfaceCDK;
|
||||||
use strict;
|
use strict;
|
||||||
|
@ -67,6 +66,9 @@ sub trapscreen {
|
||||||
} else {
|
} else {
|
||||||
$action = @$traps_set[$act];
|
$action = @$traps_set[$act];
|
||||||
}
|
}
|
||||||
|
undef $titlepanel;
|
||||||
|
undef $flagsset;
|
||||||
|
undef $borpabel;
|
||||||
return($action);
|
return($action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,6 +91,9 @@ sub trapsnotes {
|
||||||
if (!defined $notes) {
|
if (!defined $notes) {
|
||||||
$notes = $borrower->{'borrowernotes'};
|
$notes = $borrower->{'borrowernotes'};
|
||||||
}
|
}
|
||||||
|
undef $notesbox;
|
||||||
|
undef $borpanel;
|
||||||
|
undef $titlepanel;
|
||||||
return $notes;
|
return $notes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -110,6 +115,9 @@ sub reservesdisplay {
|
||||||
my $reslist = new Cdk::Scroll('Title'=>"",'List'=>\@itemslist,
|
my $reslist = new Cdk::Scroll('Title'=>"",'List'=>\@itemslist,
|
||||||
'Height'=>10,'Width'=>76,'Xpos'=>1,'Ypos'=>10);
|
'Height'=>10,'Width'=>76,'Xpos'=>1,'Ypos'=>10);
|
||||||
$reslist->activate();
|
$reslist->activate();
|
||||||
|
undef $reslist;
|
||||||
|
undef $borpanel;
|
||||||
|
under $titlepanel;
|
||||||
}
|
}
|
||||||
|
|
||||||
END { } # module clean-up code here (global destructor)
|
END { } # module clean-up code here (global destructor)
|
||||||
|
|
|
@ -43,35 +43,6 @@ my $priv_var = '';
|
||||||
my %secret_hash = ();
|
my %secret_hash = ();
|
||||||
|
|
||||||
#defining keystrokes used for screens
|
#defining keystrokes used for screens
|
||||||
my $lastval = chr(18);
|
|
||||||
my $key_tab = chr(9);
|
|
||||||
my $key_ctla = chr(1);
|
|
||||||
my $key_ctlb = chr(2);
|
|
||||||
my $key_ctlc = chr(3);
|
|
||||||
my $key_ctld = chr(4);
|
|
||||||
my $key_ctle = chr(5);
|
|
||||||
my $key_ctlf = chr(6);
|
|
||||||
my $key_ctlg = chr(7);
|
|
||||||
my $key_ctlh = chr(8);
|
|
||||||
my $key_ctli = chr(9);
|
|
||||||
my $key_ctlj = chr(10);
|
|
||||||
my $key_ctlk = chr(11);
|
|
||||||
my $key_ctll = chr(12);
|
|
||||||
my $key_ctlm = chr(13);
|
|
||||||
my $key_ctln = chr(14);
|
|
||||||
my $key_ctlo = chr(15);
|
|
||||||
my $key_ctlp = chr(16);
|
|
||||||
my $key_ctlq = chr(17);
|
|
||||||
my $key_ctlr = chr(18);
|
|
||||||
my $key_ctls = chr(19);
|
|
||||||
my $key_ctlt = chr(20);
|
|
||||||
my $key_ctlu = chr(21);
|
|
||||||
my $key_ctlv = chr(22);
|
|
||||||
my $key_ctlw = chr(23);
|
|
||||||
my $key_ctlx = chr(24);
|
|
||||||
my $key_ctly = chr(25);
|
|
||||||
my $key_ctlz = chr(26);
|
|
||||||
my $lastval = $key_ctlr;
|
|
||||||
|
|
||||||
# here's a file-private function as a closure,
|
# here's a file-private function as a closure,
|
||||||
# callable as &$priv_func; it cannot be prototyped.
|
# callable as &$priv_func; it cannot be prototyped.
|
||||||
|
|
|
@ -47,34 +47,8 @@ my $priv_var = '';
|
||||||
my %secret_hash = ();
|
my %secret_hash = ();
|
||||||
|
|
||||||
#defining keystrokes used for screens
|
#defining keystrokes used for screens
|
||||||
my $lastval = chr(18);
|
|
||||||
my $key_tab = chr(9);
|
my $key_tab = chr(9);
|
||||||
my $key_ctla = chr(1);
|
|
||||||
my $key_ctlb = chr(2);
|
|
||||||
my $key_ctlc = chr(3);
|
|
||||||
my $key_ctld = chr(4);
|
|
||||||
my $key_ctle = chr(5);
|
|
||||||
my $key_ctlf = chr(6);
|
|
||||||
my $key_ctlg = chr(7);
|
|
||||||
my $key_ctlh = chr(8);
|
|
||||||
my $key_ctli = chr(9);
|
|
||||||
my $key_ctlj = chr(10);
|
|
||||||
my $key_ctlk = chr(11);
|
|
||||||
my $key_ctll = chr(12);
|
|
||||||
my $key_ctlm = chr(13);
|
|
||||||
my $key_ctln = chr(14);
|
|
||||||
my $key_ctlo = chr(15);
|
|
||||||
my $key_ctlp = chr(16);
|
|
||||||
my $key_ctlq = chr(17);
|
|
||||||
my $key_ctlr = chr(18);
|
my $key_ctlr = chr(18);
|
||||||
my $key_ctls = chr(19);
|
|
||||||
my $key_ctlt = chr(20);
|
|
||||||
my $key_ctlu = chr(21);
|
|
||||||
my $key_ctlv = chr(22);
|
|
||||||
my $key_ctlw = chr(23);
|
|
||||||
my $key_ctlx = chr(24);
|
|
||||||
my $key_ctly = chr(25);
|
|
||||||
my $key_ctlz = chr(26);
|
|
||||||
my $lastval = $key_ctlr;
|
my $lastval = $key_ctlr;
|
||||||
|
|
||||||
# here's a file-private function as a closure,
|
# here's a file-private function as a closure,
|
||||||
|
|
Loading…
Reference in a new issue