/// <summary> /// Dispose method. Inheritors should override this method to do any additional cleanup. /// </summary> protected override void Dispose(bool disposing) { if (disposing && _frameReference != null) { _frameReference.Dispose(); _frameReference = null; } base.Dispose(disposing); }
private void DecompressFrame(IFrameReference frameReference) { try { frameReference.Frame.GetNormalizedPixelData(); _synchronizationContext.Post(OnDecompressedFrame, frameReference); } catch (Exception e) { Platform.Log(LogLevel.Error, e); } finally { frameReference.Dispose(); } }
private void RetrieveFrame(IFrameReference frameReference) { try { Frame frame = frameReference.Frame; IStreamingSopFrameData frameData = (IStreamingSopFrameData)frame.ParentImageSop.DataSource.GetFrameData(frame.FrameNumber); frameData.RetrievePixelData(); _framesToDecompress.Add(frameReference); _synchronizationContext.Post(OnRetrievedFrame, frameData.LastRetrievePerformanceInfo); } catch (Exception e) { frameReference.Dispose(); Platform.Log(LogLevel.Error, e); } }
protected override void Dispose(bool disposing) { if (disposing) { _fusionOverlayLayer = null; _fusionOverlayComposite = null; if (_baseFrameReference != null) { _baseFrameReference.Dispose(); _baseFrameReference = null; } if (_overlayFrameDataReference != null) { _overlayFrameDataReference.Dispose(); _overlayFrameDataReference = null; } } base.Dispose(disposing); }