Capture.Interface.Screenshot.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

Same methods

Screenshot::Dispose ( bool disposing ) : void

Usage Example

示例#1
0
 protected void ProcessCapture(RetrieveImageDataParams data)
 {
     var screenshot = new Screenshot(data.RequestId, data.Data, data.Width, data.Height, data.Pitch);
     try
     {
         this.Interface.SendScreenshotResponse(screenshot);
     }
     catch (RemotingException ex)
     {
         this.TraceMessage("RemotingException: " + ex.Message);
         screenshot.Dispose();
         // Ignore remoting exceptions
         // .NET Remoting will throw an exception if the host application is unreachable
     }
     catch (Exception e)
     {
         this.DebugMessage(e.ToString());
     }
     finally
     {
     }
 }