Destructor.
~stream();
Destroys the stream and all associated resources.
A stream object must not be destroyed while there are pending asynchronous operations associated with it.