| 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 | { |
nothing calls this directly
no test coverage detected