1. cluster seems to have a memory leak, put DESTROY functions in where
[spider.git] / perl / DXLog.pm
index 8e2fc66febaa2021d06fa641bc8771cace0d9708..f089d73d0cecc28058bfd975eaf47df79d207ab5 100644 (file)
@@ -161,7 +161,14 @@ sub close
 {
        my $self = shift;
        undef $self->{fh};                      # close the filehandle
-       delete $self->{fh};
+       delete $self->{fh};     
+}
+
+sub DESTROY
+{
+       my $self = shift;
+       undef $self->{fh};                      # close the filehandle
+       delete $self->{fh} if $self->{fh};
 }
 
 # log something in the system log