XMLRPC-c and json-c are examples of C libraries that use reference counting (and have slightly different approaches to when they grow them behind the scenes). If you work in a multi-threaded environment, you might also be interested in using kref in the Linux kernel.
source share