(defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition))
(handler-case
- (progn (g-object-property-type (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) :assert-readable t) t)
+ (and (pointer object)
+ (progn (g-object-property-type (pointer object) (gobject-property-effective-slot-definition-g-property-name slot) :assert-readable t) t))
(property-unreadable-error () nil)))
(defmethod slot-value-using-class ((class gobject-class) object (slot gobject-property-effective-slot-definition))
new-value)
(defmethod slot-boundp-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition))
- (not (null (gobject-fn-effective-slot-definition-g-getter-fn slot))))
+ (and (pointer object)
+ (not (null (gobject-fn-effective-slot-definition-g-getter-fn slot)))))
(defmethod slot-value-using-class ((class gobject-class) object (slot gobject-fn-effective-slot-definition))
(let ((fn (gobject-fn-effective-slot-definition-g-getter-fn slot)))
(defun ref-count (pointer)
(foreign-slot-value (if (pointerp pointer) pointer (pointer pointer)) 'g-object-struct :ref-count))
+(defmethod release ((obj g-object))
+ (cancel-finalization obj)
+ (let ((p (pointer obj)))
+ (setf (pointer obj) nil)
+ (g-object-dispose-carefully p)))
+
(defmethod initialize-instance :around ((obj g-object) &key)
(when *currently-making-object-p*
(setf *currently-making-object-p* t))