close

fun close()(source)

The ImageBitmap.close() method disposes of all graphical resources associated with an ImageBitmap.

MDN Reference