//Close all patchs open at the moment and release the memory of instance of Pure-datas private void Close() { foreach (Patch patch in _loadedPatches) { patch.Dispose(); } _loadedPatches.Clear(); manager.Dispose(); PD.Dispose(); pdDsp = false; }
void Dispose(bool isDisposing) { // Only for illustration purposes, simply disposing of _patch and _pd is enough as with any sane implementation of IDisposable. // Unsubscribe from all message receivers _pd.Messaging.Unbind(CursorReceiver); _pd.Messaging.Float -= Pd_Float; // Stop audio _pd.Stop(); // Dispose of the IDisposables in correct order _patch.Dispose(); _pd.Dispose(); }
public void Cleanup() { _pd.Dispose(); }