public void Dispose() { Log.Debug("OutputDeviceManager.Dispose()"); if (_OutputDevice != null) { Log.Debug("Disposing output device"); _OutputDevice.Dispose(); _OutputDevice = null; Log.Debug("Disposing output device factory"); _OutputDeviceFactory.Dispose(); } }
public virtual void Close() { bool locked = false; try { IOmonitor.IdleForLock(_IOprocessing); // if (_OutputDevice != null && _OutputDevice.IsInitialized && _OutputDevice.InitializedBy == ParentIDE.Machine) { locked = false; if (_OutputDevice.IsLockingRequiredForDispose()) { IOmonitor.IdleForLock(_OutputDevice, out locked); } _OutputDevice.Dispose(); if (locked) { IOmonitor.Unlock(_OutputDevice); } } _OutputBuffer.Clear(); } finally { if (locked) { IOmonitor.Unlock(_OutputDevice); } // IOmonitor.Unlock(_IOprocessing); } }
/// <summary> /// アプリケーション全体の終了準備 /// </summary> private static void FinalizeApp() { if (FinalizeProcess) { return; } FinalizeProcess = true; if (OutputDevice != null) { OutputDevice.Dispose(); OutputDevice = null; } MyComponentManager.FinalizeComponents(); }