Function

Vipsstrdup

Declaration [src]

char*
vips_strdup (
  VipsObject* object,
  const char* str
)

Description [src]

g_strdup() a string. When object is freed, the string will be freed for you. If object is NULL, you need to free the memory yourself with g_free().

This function cannot fail.

See also

vips_malloc().

Parameters

object

Type: VipsObject

Allocate memory local to this VipsObject, or NULL.

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

Type: const char*

String to copy.

The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.

Return value

Type: char*

A pointer to the allocated memory.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.