public void Stop() { if (readWorker != null) { workerRunning = false; readWorker?.Join(); readWorker = null; } ipc?.Close(); ipc = null; oscSrv?.Dispose(); oscSrv = null; }
private void OnIPCClientDisconnected(IPCServer pipe) { UnhookAll(); _pluginProxy.Teardown(); _ipcPipe.Close(); if (_pluginAppDomain != null) { AppDomain.Unload(_pluginAppDomain); _pluginAppDomain = null; } //Notify the main thread that it is time to unload the dll. _unloadEvent.Set(); }