
Example 08: HotRestart

This example demonstrates how Live++ can be used to hot-restart running processes, injecting existing code
changes into the restarted application. This completely eliminates link time between application restarts.

After starting the application, make a change to the code, e.g. as described in the "FireDemo" constructor in
FireDemo.cpp, hot-reload the changes, and then hot-restart the application. Notice how the restarted process
has all changes injected when loading the Live++ agent.
Processes can be hot-restarted by either clicking "Tools -> Hot-restart processes" in the Broker, pressing
"CTRL + R" in the Broker, or right-clicking on one or several selected processes in the "Processes" view in
the Broker, clicking "Hot-restart selected processes".

The example also shows how to schedule a hot-restart at any time by calling the ScheduleRestart() API.
This is demonstrated in "MainLoop.cpp" in "MainLoop::PollInput" and hot-restarts whenever the "F2" key is
pressed in the application.

Subsequent changes to the code will get injected into all processes during hot-restart, no matter at which
point in time they were started. Of course this also works for multiple processes as well.

When using the Visual Studio debugger, the debugger will automatically be attached to the hot-restarted
processes.

Interesting things to look at and try out have been marked with "Live++" in the source code.
