An all-optical memory with three states is presented. The memory is realized from three coupled ring lasers. The state of the optical memory is determined by the wavelength of the memory's output light. In each state, only one wavelength is dominant. The three-state all-optical memory can be utilized in all-optical packet switches. The concept of the memory is explained and experimental results are presented that demonstrate that a contrast ratio larger than 40 dB between output states of the memory can be obtained.