$top->protocol( 'WM_DELETE_WINDOW', sub { my_clean_up_routine( $top, $another_parameter ); } );