… | |
… | |
376 | my $pl_ref = $pl->refcnt_cnt; |
376 | my $pl_ref = $pl->refcnt_cnt; |
377 | my $ob_ref = $ob->refcnt_cnt; |
377 | my $ob_ref = $ob->refcnt_cnt; |
378 | |
378 | |
379 | if ($pl_ref == 2 && $ob_ref == 1) { |
379 | if ($pl_ref == 2 && $ob_ref == 1) { |
380 | warn "player-scheduler destroy ", $ob->name;#d# |
380 | warn "player-scheduler destroy ", $ob->name;#d# |
381 | delete $cf::PLAYER{$ob->name}; |
381 | #delete $cf::PLAYER{$ob->name}; |
382 | # pl_ref == one from object + one from cf::PLAYER |
382 | ## pl_ref == one from object + one from cf::PLAYER |
383 | # ob_ref == one from simply being an object |
383 | ## ob_ref == one from simply being an object |
384 | $ob->destroy; |
384 | #$ob->destroy; |
385 | $pl->destroy; |
385 | #$pl->destroy; |
386 | } else { |
386 | } else { |
387 | warn "player-scheduler refcnt ", $ob->name, " $pl_ref,$a_ $ob_ref,$b_\n";#d# |
387 | warn "player-scheduler refcnt ", $ob->name, " $pl_ref,$a_ $ob_ref,$b_\n";#d# |
388 | } |
388 | } |
389 | } |
389 | } |
390 | }; |
390 | }; |