Just because the user-interface decided it didn’t need to exist, doesn’t mean it can be removed immediately. If it started a “background process” on the item, it needs to wait for the process to finish, or request the abort and wait for confirmation before destroying it.