The Talmud cautions us numerous times against allowing ourselves to forget anything which we have learned. In fact, we are taught that one who allows oneself to forget any of one's Torah studies violates a prohibition of the Torah and is compared to one who takes his own life. In an effort to assist one in safeguarding one's Torah knowledge, the Talmud suggests avoiding a number of activities and practices which are said to lead to forgetfulness. Although there are many such examples, we will explore some of the more common and prominent ones.
One must never eat from food which an animal had eaten from first, though if absolutely necessary one may cut off the area that was eaten by the animal and eat the rest. One should not use one's clothes as a pillow or for drying one's hands. When getting out the shower one should make sure to be completely dried off before getting dressed – that's what towels were made for! Furthermore, one should never put on two garments at once  or sew or otherwise make alterations to a garment which one is currently wearing. Getting angry (or even staring at a person who is angry), extensive worrying, and partaking in too many elaborate meals are also said to cause one to forget one's studies. One should never leave a book open when taking leave of it.
There are a number of instances where one is halachically required to wash one's hands, and neglecting to do so is said to lead to forgetfulness. So too, one must never drink anything which was previously used for any type of washing. One should not wash one's feet together, one on top of the other. Disregarding proper manners – for instance, failing to stand at the arrival of one's rabbi, is said to cause one to forget one's studies, as well.
Olives have a unique place in this discussion of forgetfulness. Eating olives frequently is also said to lead to forgetfulness. According to kabbala the olive tree does not posses a heart - which in turn is said to cause confusion in human hearts and minds. Eating olives occasionally, however, does not pose any risk to one's memory. In fact, there are numerous examples throughout the Talmud where we find the great sages enjoying olives from time to time. Eating olives once a month poses no concern whatsoever. Some suggest that the original concern regarding eating olives applied only to raw olives but not those that are pickled, marinated, or even salted. So too, eating olives together with olive oil is said to nullify the forgetful effects of olives. Alternatively, it might be that the ban on eating olives only applies when eating olives as the mainstay of one's meal but not when simply enjoying them as a condiment. For those concerned about the effects of eating olives, one can neutralize any negative effects by concentrating on certain verses of the Torah when eating them.
One should avoid eating the hearts of animals, as the soul of an animal remains absorbed in the heart. As such, eating hearts can cause one to be influenced in animalistic ways – which, by extension, causes one to forget one's studies. Although according to most authorities the practices listed here do not apply to women, some recommend that women at least avoid eating hearts. Additional practices which are said to lead to forgetfulness include passing under a camel or its reins, passing between two camels or two women, passing a place where one can smell a carcass, and passing under a bridge which has not had water under it for forty days. Eating bread that was not fully baked and staring excessively at the face of a deceased person are also cited as causes of forgetfulness.
Although it may not be immediately apparent in all of the examples cited above, there is actually a common denominator among all the things which are said to lead to forgetfulness, and that is, - laziness. To illustrate: One who is thirsty and needs to drink something should get up and prepare a fresh drink and not just drink droplets which may have been left over from some prior use. One who wants to lay down for a rest should prepare a pillow instead of resorting to using one's clothes.
Getting dressed is actually an exercise in dignity, and one should do so with some reverence, putting on one garment at a time instead of looking for shortcuts by trying to put on two garments at once. Additionally, there is something not just lazy, but even animalistic about eating bread - or any other food for that matter- which is not fully baked; wait patiently for it to completely finish baking! It may just be that the lesson we are to learn from this code of conduct is that knowledge is not gained by cutting corners or finding shortcuts, either. True knowledge is gained the old fashioned way - by sitting down with a book, studying it's contents and always going back to review.
 Menachot 99b, Yoma 38b, Sanhedrin 99a
 Avot 3:10
 Horiyot 13b, Rivevot Ephraim 6:6
 Be'er Heitev 170:12, Be'er Moshe 8:113. Some authorities rule that this prohibition does not apply to eat food that a cat or mouse had eaten from. Sefer Chassidim 1008, Yabia Omer Y.D. 2:8
 Horiyot 13b
 Tashbetz 151, Tashbetz Katan 287, Magen Avraham 158:17, Mishna Berura 158:45
 Mishne Halachot 13:52
 Magen Avraham 2:3, Kitzur Shulchan Aruch 3:5, Mishna Berura 2:2, Rivevot Ephraim 2:4, 3:6, Yosef Ometz 201
 Nedarim 22b
 Sefer Chassidim 1126
 Sanhedrin 26b
 Pesachim 49a
 Shach Y.D. 277
 O.C. 4:18
 Horiyot 13b, See also Rivevot Ephraim 2:9
 Kiddushin 33b
 Horiyot 13b
 Rabbeinu Bachaye;Vayishlach
 Yevamot 15b, Salmat Chaim 1:42
 Berachot 40a, Avnei Derech 2:30
 Mor Uktzia 170
 Salmat Chaim 869
 Mor Uktzia 170
 Kaf Hachaim O.C. 157:27, Magen Avraham 170:19, Be'er Heitev 170:12
 Horiyot 13b
 Kaf Hachaim 157:28, 24:48
 Horiyot 13b
 Mishna Berura 3:3