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 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 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

Returns: 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.