JUCEDemo -- App QUIT code not reached


#1

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)
    {
        systemRequestedQuit();
        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?


#2

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!