A model of hot loops associated with solar flares