This action breaks the association between the stream and the object it is attached to. If the stream was attached to a buffer, discard destroys the buffer. If this buffer is later reopened, its contents will be empty. An attempt to access a discarded buffer results in an error.