-(defmethod instance-finalizer ((instance proxy))
- (let ((class (class-of instance))
- (type (type-of instance))
- (location (proxy-location instance)))
- (declare (type symbol type) (type system-area-pointer location))
- (let ((free (proxy-class-free class)))
- #'(lambda ()
- (funcall free type location)
- (remove-cached-instance location)))))
-
-
-(deftype-method translate-type-spec proxy (type-spec)
- (declare (ignore type-spec))
- (translate-type-spec 'pointer))
-
-(deftype-method size-of proxy (type-spec)
- (declare (ignore type-spec))
- (size-of 'pointer))
-
-(deftype-method translate-from-alien
- proxy (type-spec location &optional weak-ref)
- `(let ((location ,location))
- (unless (null-pointer-p location)
- (ensure-proxy-instance ',type-spec location ,weak-ref))))