kripken/emscripten — comment on commit 2e2a9c1a768dabbdc0eb48a01638b32c55f1073a
File:  line 0
By crazyjul:

It is needed for media application. The program should be updated for each frame. A callback is registered, but the main is exited. In case of C++ program, all global objects are destructed. This prevents global destruction.