+(defmethod make-proxy-instance ((class gobject-class) location &rest initargs)
+ (declare (ignore location initargs))
+ (if (slot-value class 'instance-slots-p)
+ (error "An object of class ~A has instance slots and should only be created with MAKE-INSTANCE" class)
+ (call-next-method)))
+
+(defmethod initialize-instance :around ((object gobject) &rest initargs)
+ (declare (ignore initargs))
+ (call-next-method)
+ #+debug-ref-counting(%object-weak-ref (foreign-location object))
+ #+glib2.8
+ (when (slot-value (class-of object) 'instance-slots-p)
+ (with-slots (location) object
+ (%object-add-toggle-ref location)
+ (%object-unref location))))
+
+