in reply to Query on refcounting with container objects
package a; sub DESTROY{print "hash destroyed\n"}; $b=bless {a=> 1}, "a"; $c=\$b->{a}; $b=undef; print "still holding a reference to $$c\n"; [download]