"Sometimes, to get to the next object the participant simply walked across the room. Other times, they had to walk the same distance, but through a door into a new room. From time to time, the researchers gave them a pop quiz, asking which object was currently in their backpack. The quiz was timed so that when they walked through a doorway, they were tested right afterwards. As the title said, walking through doorways caused forgetting: Their responses were both slower and less accurate when they'd walked through a doorway into a new room than when they'd walked the same distance within the same room."
Link to Original Source