in reply to Garbage collection
Where you have to worry about garbage collection is if you have circular object references in the value of the hash:
In cases like these, you should break the circular references before the delete.my $a = { }; my $b = { a => $a }; $a->{b} = $b; $hash{something} = $a; delete $hash{something};
|
|---|