Thank you for the reply.
I agree with your statement. I am currently teaching in China and a lot of the text books here have errors. This question was posed by a student to the head of our school who in turn asked myself. What I want to find out is why, in this sentence, one would say "on memory" instead of "in memory". I don't just want to answer "Because it sounds right!" What is the rule behind it?