is that viewing of janaza occuring memory loss
All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
As far as we know, it is not mentioned in the texts of the Sharee'ah that looking at a funeral leads to a loss of memory. However, some scholars mentioned that one of the reasons for forgetfulness is to look at a crucified person and excessive reading of the wooden boards that are placed on the graves. Ibn Al-Qayyim said in his book Zaad Al-Ma’aad, while listing the matters that may lead to forgetfulness:
“….Excessive worry and anxiety, looking at still water and urinating in it, looking at a crucified person, and excessive reading of the wooden boards that are placed on the graves [..] most of this is known through experience.” [End of quote -abridged]
Allah knows best.
You can search for fatwa through many choices