| 590 | } |
| 591 | |
| 592 | void VSTEditor::OnClose() |
| 593 | { |
| 594 | |
| 595 | #ifdef __WXMAC__ |
| 596 | #ifdef __WX_EVTLOOP_BUSY_WAITING__ |
| 597 | wxEventLoop::SetBusyWaiting(false); |
| 598 | #endif |
| 599 | if (mControl) |
| 600 | mControl->Close(); |
| 601 | #endif |
| 602 | |
| 603 | // Tell the instance not to use me anymore - if we do not do this, |
| 604 | // hiding the gui and then showing it again *while playing*, would leave |
| 605 | // the instance with a dangling pointer to the old owning validator |
| 606 | // for a fraction of time, thereby causing a crash. |
| 607 | GetInstance().SetOwningValidator(nullptr); |
| 608 | |
| 609 | NeedEditIdle(false); |
| 610 | |
| 611 | mNames.reset(); |
| 612 | mSliders.reset(); |
| 613 | mDisplays.reset(); |
| 614 | mLabels.reset(); |
| 615 | |
| 616 | mParent = NULL; |
| 617 | mDialog = NULL; |
| 618 | |
| 619 | mAccess.Flush(); |
| 620 | |
| 621 | ValidateUI(); |
| 622 | } |
nothing calls this directly
no test coverage detected