JUCEDemo -- App QUIT code not reached

If I add this line to ~/JUCE/JUCE-master/modules/juce_gui_basics/application/juce_Application.cpp

bool JUCEApplication::perform (const InvocationInfo& info)
    printf( "foo" );
    if (info.commandID == StandardApplicationCommandIDs::quit)
        return true;

    return false;

I would expect to see "foo" printed to the console when I quit the demo.

But I don't.

Why is this?

There are obviously other code-paths that can lead to the same thing. Put a breakpoint in JUCEApplicationBase::quit() and see where it gets called from.

And no printfs for debugging, please - you're writing C++, not C! You should get into the habit of using std::cout or std::cerr, or the juce DBG macro!