I wonder where is the reference count stored? As the type is defined as:
typedef char GRefString;
And all the g_ref_string*…()
functions are returning simply gchar *
instead of a structure, which could hold the reference count. Is it the trick of sds
library, to hold a metadata header structure right before the char *
pointed memory? I'm afraid that such implementation can backfire at some point, am I right? I.e.: what problems can arise when using such pre-header equipped strings?