In most cases, airlines only dump air in midair immediately before landing. They don't do it before or during takeoff, nor do they do it halfway through their flight. Rather, airlines may dump some of their airplane's excess fuel immediately before landing so that it lowers the weight of their aircraft.