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.

::: seealso 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 string is a NUL terminated UTF-8 string.

Return value

Returns: utf8
 

A pointer to the allocated memory.

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