Re: portable finalizer



On Jul 4, 1:40 am, Tamas Papp <tkp...@xxxxxxxxx> wrote:
(defmethod destroy ((object foo))
(with-slots (pointer) object
(when pointer
(call_c_api_to_destroy pointer)
(setf pointer nil))))

You might want to setf pointer to a null pointer instead of to NIL, so
that the type of pointer is always a C pointer. Not a big deal but it
could be a useful invariant.

mfh

.



Relevant Pages