+#+debug-ref-counting
+(defmethod print-object ((instance gobject) stream)
+ (print-unreadable-object (instance stream :type t :identity nil)
+ (if (proxy-valid-p instance)
+ (format stream "at 0x~X (~D)" (sap-int (foreign-location instance)) (ref-count instance))
+ (write-string "at \"unbound\"" stream))))
+