Not sure whether this is the same or something even more problematic: use threads; use Scalar::Util qw(weaken); my $object = Foo->new; my $ref = $object; weaken( $ref ); threads->new( sub { $ref = $object } )->join; # the $ref = $object causes problems warn "thread ended\n"; package Foo; sub new { bless {},shift } sub DESTROY { warn "DESTROY called in ".(threads->tid)." with $_[0]\n" } gives: DESTROY called in 0 with Foo=HASH(0x198d74) panic: magic_killbackrefs at line 9. DESTROY called in 1 with Foo=HASH(0x1f8cb4) Attempt to free unreferenced scalar: SV 0x1f8cc0 during global destruction. DESTROY called in 0 with Foo=HASH(0xfc364) Scalars leaked: 3 I wonder where that first DESTROY is coming from. And also note that the final "warn" (thread ended) is not reached. LizThread Previous