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

Function ~CardinalPlugin

src/CardinalPlugin.cpp:321–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319 }
320
321 ~CardinalPlugin() override
322 {
323 #ifdef HAVE_LIBLO
324 if (fInitializer->remotePluginInstance == this)
325 fInitializer->remotePluginInstance = nullptr;
326 #endif
327
328 {
329 const ScopedContext sc(this);
330 context->patch->clear();
331
332 // do a little dance to prevent context scene deletion from saving to temp dir
333 #if CARDINAL_VARIANT_MINI || !defined(HEADLESS)
334 const ScopedValueSetter<bool> svs(rack::settings::headless, true);
335 #endif
336 Engine_setAboutToClose(context->engine);
337 delete context;
338 }
339
340 if (! fAutosavePath.empty())
341 rack::system::removeRecursively(fAutosavePath);
342 }
343
344 CardinalPluginContext* getRackContext() const noexcept
345 {

Callers

nothing calls this directly

Calls 3

Engine_setAboutToCloseFunction · 0.85
clearMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected