Next: , Previous: allocate-stable-pointer, Up: Stable pointers


4.7.2 free-stable-pointer

— Function: free-stable-pointer
     (free-stable-pointer stable-pointer)
stable-pointer
A foreign pointer that was created with allocate-stable-pointer.

Frees the stable pointer, enabling the garbage collector to reclaim the object.

Example:

     (allocate-stable-pointer (lambda (x) (+ x 10)))
     =>
     #.(SB-SYS:INT-SAP #X00000002)
     
     (stable-pointer-value *)
     =>
     #<FUNCTION (LAMBDA (X)) {1004D016F9}>
     
     (free-stable-pointer **)
     =>
     NIL