Part of some science-y show I watched explained that doorways trigger our brains to "leave the old behind" and "prepare for new" (to greatly simplify). As we get older, it's harder to recall what we left behind - though going back into the previous room can help. They explained that if one wants to retain something from one room to the next, one should simply repeat it to oneself as one passes through the doorway. This seems to work for me.