Commit 88df9e0c authored by Andy Yates's avatar Andy Yates
Browse files

The old way was possibly the WORST way to blank a LRU cache by replacing it...

The old way was possibly the WORST way to blank a LRU cache by replacing it for a bare hash. Possible memory leak fixed ...
parent 169c6359
...@@ -1771,13 +1771,14 @@ sub seq_ids_to_regions { ...@@ -1771,13 +1771,14 @@ sub seq_ids_to_regions {
sub delete_cache{ sub delete_cache{
my ($self) = @_; my ($self) = @_;
$self->{'sr_name_cache'} = {}; %{$self->{'sr_name_cache'}} = ();
$self->{'sr_id_cache'} = {}; %{$self->{'sr_id_cache'}} = ();
foreach my $key (keys %{$self->{'_asm_mapper_cache'}}){ foreach my $key (keys %{$self->{'_asm_mapper_cache'}}){
$self->{'_asm_mapper_cache'}->{$key}->flush(); $self->{'_asm_mapper_cache'}->{$key}->flush();
} }
$self->{'_asm_mapper_cache'} = {}; %{$self->{'_asm_mapper_cache'}} = ();
return;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment