Does mental function always decline with age?

Use it or lose it. I believe there will be some inevitable decline with age but not everybody developers dementia. Some neuroscientist believe that exposure to mental training and work may sharpen or preserve your mentl skills since new brain cells and new dendrites are formed (brain plasticity).