Its like a headache when you want to debug the reference count of GOjects. You have SystemTap to debug the application but it’s bit of pain to setup it. But once you set it up then it works pretty cool.
But I choose simple way for counting the reference objects GObject-list. Clone it on your machine.
Before making it you need to install libunwind. and fire make command.
after making it use this command :
LD_PRELOAD=~/Development/tools/gobject-list/libgobject-list.so application | grep application -i
it will gives you a reference count of GObject’s.