The pilot reported that icing conditions were encountered during the climb after departure from Sydney. The anti-ice systems were then activated. The aircraft was above cloud after reaching top of climb, and the pilot turned off the anti-ice systems after ascertaining that the left engine intake was free of ice. Approximately 2 minutes later the aircraft re-entered cloud. The pilot said he shone his torch onto the centre unheated windscreen and it was white with ice. He then turned on the wing ice light and this revealed about 15 cm of ice on the leading edge of the wing. The pilot said he then selected right engine heat and the engine flamed out. He advised air traffic control that he had an engine failure and requested a clearance back to Sydney and a descent clearance. When the aircraft reached 8,000 ft. he was able to restart the engine. He then requested a clearance to Brisbane. The remainder of the flight was completed without further incident.