stream.destroy()

The method that closes a stream straight away, releasing its resources and optionally reporting an error.

In more detail

Afterwards the stream emits close, and error too if one was given. Custom streams can implement _destroy() to free their own resources.

Related terms

Taught in

References