Add a warning against using g_quark_from_static_string() in dynamically
authorMatthias Clasen <mclasen@redhat.com>
Thu, 3 Feb 2005 05:45:21 +0000 (05:45 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 3 Feb 2005 05:45:21 +0000 (05:45 +0000)
2005-02-03  Matthias Clasen  <mclasen@redhat.com>

* glib/tmpl/quarks.sgml: Add a warning against
using g_quark_from_static_string() in dynamically
loaded modules.

docs/reference/ChangeLog
docs/reference/glib/tmpl/quarks.sgml

index 531a49c..b2820f8 100644 (file)
@@ -1,3 +1,9 @@
+2005-02-03  Matthias Clasen  <mclasen@redhat.com>
+
+       * glib/tmpl/quarks.sgml: Add a warning against
+       using g_quark_from_static_string() in dynamically
+       loaded modules. 
+
 2005-02-02  Matthias Clasen  <mclasen@redhat.com>
 
        * glib/tmpl/misc_utils.sgml: 
index b62e032..9a531f3 100644 (file)
@@ -58,7 +58,11 @@ If the string does not currently have an associated #GQuark, a new
 Note that this function is identical to g_quark_from_string() except
 that if a new #GQuark is created the string itself is used rather than
 a copy. This saves memory, but can only be used if the string will
-always exist (if, for example, it is a statically-allocated string).
+<emphasis>always</emphasis> exist. It can be used with statically
+allocated strings in the main program, but not with statically 
+allocated memory in dynamically loaded modules, if you expect to
+ever unload the module again (e.g. do not use this function in
+GTK+ theme engines).
 </para>
 
 @string: a string.