[Ecls-list] Latest changes
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Thu Sep 3 14:54:30 UTC 2009
- ECL now implements weak pointers. The interface is
(ext:make-weak-pointer value) => weak-pointer
(ext:weak-pointer-value weak-pointer) => value
and it defines a new built-in type, EXT:WEAK-POINTER
> (defparameter *a* (ext:make-weak-pointer (cons 2 2)))
*A*
> (dotimes (i 10)
(format t "~&Pass #~D weak pointer value: ~A" i
(ext:weak-pointer-value *a*))
(dotimes (j 100000) (cons 1 1))
(ext:gc t))
Pass #0 weak pointer value: (2 . 2)
Pass #1 weak pointer value: NIL
Pass #2 weak pointer value: NIL
Pass #3 weak pointer value: NIL
Pass #4 weak pointer value: NIL
Pass #5 weak pointer value: NIL
Pass #6 weak pointer value: NIL
Pass #7 weak pointer value: NIL
Pass #8 weak pointer value: NIL
Pass #9 weak pointer value: NIL
NIL
More information about the ecl-devel
mailing list