GNOME Bugzilla – Bug 678223
g_mutex_free
Last modified: 2016-03-10 14:01:31 UTC
I'm replacing code that uses GStaticMutex. deprecated/gthread.h says: GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_free) void g_static_mutex_free (GStaticMutex *mutex); However, same file also says: GLIB_DEPRECATED_IN_2_32 void g_mutex_free (GMutex *mutex); I'm confused. How does one free GMutex resources these days?!
Ok, I see g_mutex_clear() is supposed to do that. Which is an awful name, BTW, considering that it doesn't even set mutex->p to NULL.
How is this not a bug: GLIB_DEPRECATED_IN_2_32_FOR(g_mutex_free) void g_static_mutex_free (GStaticMutex *mutex); Plus, clear should at least set mutex->p to NULL.
Sorry. I didn't understand the original complaint. The deprecation note should be fixed, indeed.
It has been since 2013.