‘Alee bin Kharsham said:
I saw Wakee’ bin al-Jarraah and he did not have any books with him even though he would memorise that which we did not memorise and I was amazed by this, so I asked him.
I said, O Wakee’, you do not walk with a book nor do you write on paper yet you memorise more than us! Whereupon Wakee’ responded by saying – whispering into my ear – O ‘Alee! If I were to tell you about the illness that causes forgetfulness will you then act upon it? (i.e. cease doing it) I replied, Yes by Allaah!
He said, Leaving off sin, for by Allaah I have not seen anything more beneficial with regards to memorising than leaving off sin.
[Siyaar ‘Alaam an-Nubalaa volume 6 page 384]