Option arguments where the result is stored in a string or string array need to
be freed by the owner of the option group. Fixes #578363.
* Frees context and all the groups which have been
* added to it.
*
+ * Please note that parsed arguments need to be freed separately (see
+ * #GOptionEntry).
+ *
* Since: 2.6
*/
void g_option_context_free (GOptionContext *context)
* <listitem><para>%gdouble</para></listitem>
* </varlistentry>
* </variablelist>
+ * If @arg type is %G_OPTION_ARG_STRING or %G_OPTION_ARG_FILENAME the location
+ * will contain a newly allocated string if the option was given. That string
+ * needs to be freed by the callee using g_free(). Likewise if @arg type is
+ * %G_OPTION_ARG_STRING_ARRAY or %G_OPTION_ARG_FILENAME_ARRAY, the data should
+ * be freed using g_strfreev().
* @description: the description for the option in <option>--help</option>
* output. The @description is translated using the @translate_func of the
* group, see g_option_group_set_translation_domain().