Just why the brain erases certain memories has long been a topic of interest to scientists.

Now, new research suggests that short-term memory is erased by the brain on purpose, so that new, more relevant memories can be recorded.

At least in fruit flies.

Researchers from China and the United States have found that flies have a protein called Rac that does the job of eroding a memory when needed. The researchers experimented with Rac levels in fruit flies and subjected the flies to two circumstances: a foul smelling odor and a foul smelling odor that also came with an electric shock.

Under normal circumstances, after being exposed to both situations, flies picked the lesser of the two evils  the foul odor without the shock.