CaptchaImage.CaptchaImage.Dispose C# (CSharp) Method

Dispose() public method

Releases all resources used by this object.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            GC.SuppressFinalize(this);
            this.Dispose(true);
        }

Same methods

CaptchaImage::Dispose ( bool disposing ) : void

Usage Example

コード例 #1
0
    // Create a CAPTCHA image using the text stored in the Session object.
    protected void Page_Load(object sender, EventArgs e)
    {
        CaptchaImage.CaptchaImage ci = new CaptchaImage.CaptchaImage(Session["CaptchaCode"].ToString(), 200, 50, "Century Schoolbook");

        // Change the response headers to output a JPEG image.
        Controls.Clear();
        Response.Clear();
        Response.ContentType = "image/jpeg";

        // Write the image to the response stream in JPEG format.
        ci.Image.Save(Response.OutputStream, ImageFormat.Jpeg);

        // Dispose of the CAPTCHA image object.
        ci.Dispose();
    }
All Usage Examples Of CaptchaImage.CaptchaImage::Dispose