MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / ~CardinalUI

Function ~CardinalUI

src/CardinalUI.cpp:495–530  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493 }
494
495 ~CardinalUI() override
496 {
497 rack::contextSet(context);
498
499 context->nativeWindowId = 0;
500
501 rack::window::WindowSetPluginUI(context->window, nullptr);
502
503 context->tlw = nullptr;
504 context->ui = nullptr;
505
506 #if CARDINAL_VARIANT_MINI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
507 {
508 const ScopedContext sc(this);
509 context->patch->clear();
510
511 // do a little dance to prevent context scene deletion from saving to temp dir
512 const ScopedValueSetter<bool> svs(rack::settings::headless, true);
513 Engine_setAboutToClose(context->engine);
514 delete context;
515 }
516
517 if (! fAutosavePath.empty())
518 rack::system::removeRecursively(fAutosavePath);
519 #endif
520
521 #if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
522 if (fInitializer->shouldSaveSettings)
523 {
524 INFO("Save settings");
525 rack::settings::save();
526 }
527 #endif
528
529 rack::contextSet(nullptr);
530 }
531
532 void onNanoDisplay() override
533 {

Callers

nothing calls this directly

Calls 5

Engine_setAboutToCloseFunction · 0.85
contextSetFunction · 0.50
WindowSetPluginUIFunction · 0.50
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected