Method

VipsDbufsteal

Declaration [src]

unsigned char*
vips_dbuf_steal (
  VipsDbuf* dbuf,
  size_t* size
)

Description [src]

Destroy a buffer, but rather than freeing memory, a pointer is returned. This must be freed with g_free().

A \0 is appended, but not included in the character count. This is so the pointer can be safely treated as a C string.

Parameters

size

Type: size_t*

Optionally return length in bytes here.

The argument can be NULL.
The data is owned by the caller of the method.

Return value

Type: unsigned char*

The pointer held by dbuf.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.