Question: do accidentals last the whole measure?
Answer: Isn't it clear – accidentals in the key signature are always in force and for all octave registers unless annulled by natural signs. An accidental found in a measure is valid for this note and for the entire measure – no longer, no shorter. But this was not always so.