Gio.MemoryOutputStream.steal_data

### Method

# Gio MemoryOutputStreamsteal_data

since: 2.26

#### Declaration [src]

    gpointer
    g_memory_output_stream_steal_data (
      GMemoryOutputStream* ostream
    )

#### Description [src]

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 returned data, and is responsible for freeing it.
The return value can be `NULL`.