# DeleteStream

Deletes a random stream.

## Syntax

Fortran:

status = vsldeletestream( stream )

C:

status = vslDeleteStream( &stream );

## Description

This function deletes the random stream created by one of the initialization functions.

## Input/Output Parameters

Name | Type | Description
--- | --- | ---
stream | FORTRAN: TYPE(VSL_STREAM_STATE), INTENT(OUT) C: VSLStreamStatePtr* | FORTRAN: Stream state descriptor. Must have non-zero value. After the stream is successfully deleted, the descriptor becomes invalid. C: Stream state descriptor. Must have non-zero value. After the stream is successfully deleted, the pointer is set to NULL.

## Return Values

VSL_ERROR_OK, VSL_STATUS_OK
  Indicates no error, execution is successful.
VSL_ERROR_NULL_PTR
  srcstream parameter is a NULL pointer.
VSL_ERROR_BAD_STREAM

  srcstream is not a valid random stream.

VSL_ERROR_MEM_FAILURE

  System cannot allocate memory for newstream.

Parent topic: Service Routines