dispose Method

Summary

Clears the ImageLoader instance.

Syntax
TypeScript
JavaScript
ImageLoader.prototype.dispose = function() 
dispose(): void; 

Remarks

Dispose does two things:

  1. Calls Abort.
  2. Clears references to all properties (such as WorkingImageElement, Element, Url, etc).

Because Dispose calls Abort, Dispose is generally preferred when attempting to completely stop and disregard an image request.

Dispose is called internally after Always callbacks are run when the image request completes, if it completes. As noted elsewhere, Done, Fail, and Always will not run if Abort is called.

After Dispose is called, the ImageLoader is completely unusable for image requests.

Requirements

Target Platforms

Help Version 20.0.2020.3.31
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly