My app uses a UINavigationController with a few views. In one of my views, I put a small bit of code in my dealloc which basically just saves something to sqlite. Dealloc isn't necessarily called when you terminate. Though, viewWillDisappear seems to always be called. I guess I could do a little hack to recognize which direction I'm coming from. Is there a way to guarantee a dealloc when you terminate?