Interface adopted by a type which has deterministic cleanup logic. For example:
- Most rendering-related types, such as RenderGraphic and Viewport, own WebGL resources which must be explicitly released when no longer needed.
- Some low-level objects like ECDb own native types defined in C++ code which must be explicitly released when no longer needed.
IDisposable tends to be contagious; that is, if a type has members which implement IDisposable, that type should also implement IDisposable to dispose of those members.
Implementations of IDisposable tend to be more "low-level" types. The disposal of such types is often handled on your behalf by imodel.js. However, always consult the documentation for an IDisposable type to determine under what circumstances you are expected to explicitly dispose of it.
|dispose(): void||Disposes of any resources owned by this object.|
Last Updated: 20 September, 2019