Пример #1
0
void ScopeSync::shutDownIfLastInstance()
{
    if (getNumScopeSyncInstances() == 0)
    {
		ScopeSyncOSCServer::deleteInstance();
        StyleOverrideClipboard::deleteInstance();
        ParameterClipboard::deleteInstance();
        Icons::deleteInstance();
        ImageLoader::deleteInstance();
        UserSettings::deleteInstance();
        AboutBoxWindow::deleteInstance();

        ScopeSyncGUI::deleteTooltipWindow();

        if (ScopeSyncApplication::inScopeFXContext())
            shutdownJuce_GUI();
    }
}
Пример #2
0
int lua_shutdown(lua_State *L) {
    DBG("START CLEANING");
    LApp = nullptr;
    lua_gc(L, LUA_GCCOLLECT, 0 );
    // clean instanciated but never used or orphan objects
    if (LUA_COMMON::objects.size()) {
        for (auto& it : LUA_COMMON::objects) {
            if ( it.second ) {
                if ( dynamic_cast<LComponent*>( (LSelfKill*)it.second ) )
                    #if DEBUG
                    std::cout << "WARNING: object '" << it.second->myName() << "'"
                        << " instanciated but not cleaned (probably never used) -- cleaning" << std::endl;
                    #endif
                DBG(String("Cleaning object: ") + it.second->myName());
                it.second->selfKill();
            }
        }
    }
    lua_gc(L, LUA_GCCOLLECT, 0 );

    // for Android, quitApp calls appWillTerminateByForce,
    // which already calls these
    // after having called shutdown()
    #if ! JUCE_ANDROID
    DeletedAtShutdown::deleteAll();
    if ( MessageManager::getInstanceWithoutCreating() != nullptr )
        MessageManager::deleteInstance();
    shutdownJuce_GUI();
    #endif

    #if DEBUG
    if ( MessageManager::getInstanceWithoutCreating() != nullptr ) {
        DBG("WARNING: an instance of MessageManager still exists !");
    }
    #endif
    DBG("ENDED CLEANING");
    return 0;
}
Пример #3
0
void jojo_quit (void)
{
    shutdownJuce_GUI(); cpost ("Shutdown JUCE\n");
}
Пример #4
0
void shutdownSequence(OutputStream* destStream)
{
    delete destStream;
    shutdownJuce_GUI();
}