A heat exchanger comprising: a heat transfer pipe (12, 16) formed of aluminum or an aluminum alloy; and a connection pipe unit through which a refrigerant flowing out of the heat transfer pipe (12, 16) and a refrigerant flowing into the heat transfer pipe (12, 16) pass, the connection pipe unit including a gas pipe through which the refrigerant in a gaseous state flows, and a liquid pipe through which the refrigerant in a liquid state or in a two-phase gas-liquid state flows, the gas pipe and the liquid pipe each having a first refrigerant pipe (31, 41) formed of aluminum or an aluminum alloy, and a second refrigerant pipe (32, 42) formed of copper or a copper alloy, the first refrigerant pipe (31, 41) and the second refrigerant pipe (32, 42) being connected to each other, the first refrigerant pipe (31, 41) having a fall portion (33, 43) connected to the heat transfer pipe (12, 16), the fall portion (33, 43) extending downward relative to the heat transfer pipe (12, 16), wherein each connection portion (37, 47) between the first refrigerant pipe (31, 41) and the second refrigerant pipe (32, 42) is disposed in the fall portion (33, 43) of the first refrigerant pipe (31, 41), the connection pipe unit is covered with a thermally insulating material, characterised in that an anti-corrosion treatment is applied to each first refrigerant pipe (31, 41) covered with the thermally insulating material, this anti-corrosion treatment comprising the formation of a protective layer. a heat transfer pipe (12, 16) formed of aluminum or an aluminum alloy; and a connection pipe unit through which a refrigerant flowing out of the heat transfer pipe (12, 16) and a refrigerant flowing into the heat transfer pipe (12, 16) pass, the connection pipe unit including a gas pipe through which the refrigerant in a gaseous state flows, and a liquid pipe through which the refrigerant in a liquid state or in a two-phase gas-liquid state flows, a gas pipe through which the refrigerant in a gaseous state flows, and a liquid pipe through which the refrigerant in a liquid state or in a two-phase gas-liquid state flows, the gas pipe and the liquid pipe each having a first refrigerant pipe (31, 41) formed of aluminum or an aluminum alloy, and a second refrigerant pipe (32, 42) formed of copper or a copper alloy, the first refrigerant pipe (31, 41) and the second refrigerant pipe (32, 42) being connected to each other, a first refrigerant pipe (31, 41) formed of aluminum or an aluminum alloy, and a second refrigerant pipe (32, 42) formed of copper or a copper alloy, the first refrigerant pipe (31, 41) and the second refrigerant pipe (32, 42) being connected to each other, the first refrigerant pipe (31, 41) having a fall portion (33, 43) connected to the heat transfer pipe (12, 16), the fall portion (33, 43) extending downward relative to the heat transfer pipe (12, 16), wherein each connection portion (37, 47) between the first refrigerant pipe (31, 41) and the second refrigerant pipe (32, 42) is disposed in the fall portion (33, 43) of the first refrigerant pipe (31, 41), the connection pipe unit is covered with a thermally insulating material, characterised in that an anti-corrosion treatment is applied to each first refrigerant pipe (31, 41) covered with the thermally insulating material, this anti-corrosion treatment comprising the formation of a protective layer.