Prevent GC using (run body)

This commit is contained in:
David Botton 2021-01-12 15:05:00 -05:00
parent 68882c1692
commit d11148bcc9
12 changed files with 48 additions and 9 deletions

View file

@ -23,7 +23,12 @@
(set-on-click hello-element ; Now we set a function to handle clicks
(lambda (obj) ; In this case we use an anonymous function
(declare (ignore obj))
(setf (color hello-element) "green")))))
(setf (color hello-element) "green")))
(run body))) ; Keep our thread alive until connection closes
; and prevent garbage collection of our CLOG-Objects
; until no longer needed.
;; To see all the events one can set and the many properties and styles that
;; exist, take a look through the CLOG manual or the file clog-element.lisp