For this to work, the program you are restarting must have opted in to the Restart Manager. Most programs do not do this, but some of the more important ones do.
Using this is better than killing the process and re-running it:
- Killing a process when you do not need to is a bad idea because it may be in the middle of writing data which is then corrupted.
- The program you want to restart may do a better job of restoring its previous state (open windows, documents, etc.) than if you simply re-launched it normally. (Of course, this is up to the program, so it may not.)