London: Cravings for a sweet treat like a chocolate bar or an ice cream is not only bad for your waistline, but it also harms your brain, says a new study.

An international team has found that when a one craves for a food, one draws a mental picture of it -- this obsession is such a drain on the brain that it can make it difficult for one to concentrate on other tasks, the `Daily Mail` reported.

Fighting an all-consuming desire for chocolate or ice cream can have consequences ranging from simple memory lapses to car crashes, according to researchers.

For their study, the researchers, led by Flinders University, set out to see whether the intensity of desires for food affects a person`s ability to concentrate on other things.

The study found that volunteers whose favourite chocolate bar was unwrapped and within their reach while they sat a series of tests had slower reactions and poorer memories than those who did the same tests in a chocolate-free zone.

"Though cognitive effects of individual food cravings are likely to be small, in practice even small reductions in cognitive resources have the potential to compromise optimal performance in everyday situations, thereby reducing work efficiency or increasing the likelihood of accidents," the researchers said.

But they also believe that when one craves for a food one draws a mental picture of it -- and that filling the brain with competing images, such as visualising a rainbow, can ease cravings.