free

fun free(freeSegment: Boolean): String?

Frees the memory allocated for the #GString. If @free_segment is true it also frees the character data. If it's false, the caller gains ownership of the buffer and must free it after use with g_free().

Instead of passing false to this function, consider using g_string_free_and_steal().

Return

the character data of @string (i.e. null if @free_segment is true)

Parameters

freeSegment

if true, the actual character data is freed as well