### Method

# Gio MemoryOutputStream steal_data

since: 2.26

#### Declaration

    gpointer
    g_memory_output_stream_steal_data (
      GMemoryOutputStream* ostream
    )

#### Description

Gets any loaded data from the `ostream`. Ownership of the data is transferred to the caller; when no longer needed it must be freed using the free function set in `ostream`‘s `GMemoryOutputStream:destroy-function` property.

`ostream` must be closed before calling this function.

Available since: 2.26

#### Return value

Type: `gpointer`

The stream’s data, or `NULL` if it has previously been stolen.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.