(allocate-stable-pointer thing) => stable-pointer
Allocates a stable pointer to thing
.
(Note: stable-pointer should not be dereferenced with cffi:mem-ref
. It should only be dereferenced with stable-pointer-value
)
Example:
(allocate-stable-pointer (lambda (x) (+ x 10))) => #.(SB-SYS:INT-SAP #X00000002) (stable-pointer-value *) => #<FUNCTION (LAMBDA (X)) {1004D016F9}> (free-stable-pointer **) => NIL