Your description of dementia, however, is only true from the outside. Prior to that stage, I passed through a period of about a week where I was completely absent. I was able to behave coherently for short periods of time, but I wasn't creating any memories. It's a blank. (I have text threads saved with friends where I tell them what's happened and where I was, carry on for a bit, and then loop back to the beginning.) If identity is a pattern both stable and self-modifying over time - which, based on this experience, I believe it to be - then I had ceased exist.
I've made an agreement with my wife that, should I become demented in old age, she should feel no moral compulsion towards any course of action. She's welcome to keep whatever is left of me around so long as it gives her joy, but "I" will no longer be present, and whatever happens to whatever is left no longer matters. As far as I'm concerned she should warehouse, or (better, though unfortunately not legal where we live) euthanase my body, and get on with doing something useful with her time.