When there is no frictional forces,
the law of conservation of mechanical energy asserts that anytime potential and kinetic energy are exchanged, the total mechanical energy remains constant,
i.e. K + U = constant.
Only when there are no frictional forces in a system is mechanical energy conserved,
i.e. between the body and the air.
As a result, mechanical energy conservation is strictly applicable only in vacuum, when air friction is nonexistent.