I am 31 years old now. I also have memory issues after years and years of partying on alcohol, MDMA, cocaine, ketamine, speed and god knows what else during the whole of my 20's and when I was 30.
You are young and I am sure you will recover if you keep away from them now. I just recently kicked the last one from my list (alcohol) and I look forward to getting my old self back. Infact,,,,this is probably my first weekend free from any drug since 1998......what a thought.
I hope all goes well for you mate and I am sure it will. Let us know how you get on.