public void Dispose() { if (IntPtr.Zero != HDOC) { SoraxDLL.SPD_Close(HDOC); HDOC = IntPtr.Zero; } }
protected virtual void Dispose(bool disposing) { Logging.Debug("HDOCWrapper::Dispose({0}) @{1}", disposing, dispose_count); WPFDoEvents.SafeExec(() => { if (dispose_count == 0) { // Get rid of managed resources if (IntPtr.Zero != HDOC) { SoraxDLL.SPD_Close(HDOC); HDOC = IntPtr.Zero; } } }); ++dispose_count; }
protected virtual void Dispose(bool disposing) { Logging.Debug("HDOCWrapper::Dispose({0}) @{1}", disposing, dispose_count); try { if (dispose_count == 0) { // Get rid of managed resources if (IntPtr.Zero != HDOC) { SoraxDLL.SPD_Close(HDOC); HDOC = IntPtr.Zero; } } } catch (Exception ex) { Logging.Error(ex); } ++dispose_count; }