[Bioperl-guts-l] [14793] bioperl-live/trunk/Bio/Species.pm:
George Hartzell
hartzell at dev.open-bio.org
Sat Aug 9 19:34:11 EDT 2008
Revision: 14793
Author: hartzell
Date: 2008-08-09 19:34:11 -0400 (Sat, 09 Aug 2008)
Log Message:
-----------
Use weaken to avoid a circular reference in the tree that's
allocated, thus avoiding a memory leak.
Modified Paths:
--------------
bioperl-live/trunk/Bio/Species.pm
Modified: bioperl-live/trunk/Bio/Species.pm
===================================================================
--- bioperl-live/trunk/Bio/Species.pm 2008-08-09 17:16:44 UTC (rev 14792)
+++ bioperl-live/trunk/Bio/Species.pm 2008-08-09 23:34:11 UTC (rev 14793)
@@ -278,6 +278,7 @@
$self->{tree} = Bio::Tree::Tree->new(-node => $species_taxon);
delete $self->{tree}->{_root_cleanup_methods};
$root = $self->{tree}->get_root_node;
+ weaken($self->{tree}->{'_rootnode'}) unless isweak($self->{tree}->{'_rootnode'});
}
my @spflds = split(' ', $species);
More information about the Bioperl-guts-l
mailing list