sub DESTROY { my $w = shift; print ref($w) . " destroy called\n"; $w->destroy if ($w->IsWidget); print ref($w) . " destroy done\n"; }