Subject: | Memory leaks in Parse::DMIDecode::Handle |
Hello.
I used this package to get SMBIOS data with dmidecode.
Meanwhile, I found some weird leaks when I call probe() method.
On closer examination, It caused by absence of destructor for Parse::DMIDecode::Handle's instance.
I attach a patch in order to resolve this bug.
Subject: | handle.patch |
--- Parse/DMIDecode/Handle.pm 2018-04-14 20:49:43.095570423 +0900
+++ Parse/DMIDecode/Handle.pm.new 2018-04-14 20:49:14.208129469 +0900
@@ -285,6 +285,10 @@
return (\%data,\%keywords);
}
+sub DESTROY {
+ my $self = shift;
+ delete $objstore->{_refaddr($self)};
+}
sub TRACE {
return unless $DEBUG;