A GStaticPrivate works almost like a GPrivate, but it has one
significant advantage. It doesn't need to be created at run-time
like a GPrivate, but can be defined at compile-time. This is
similar to the difference between GMutex and GStaticMutex. Now
look at our give_me_next_number() example with
GStaticPrivate:
A GStaticPrivate works almost like a GPrivate, but it has one significant advantage. It doesn't need to be created at run-time like a GPrivate, but can be defined at compile-time. This is similar to the difference between GMutex and GStaticMutex. Now look at our give_me_next_number() example with GStaticPrivate: