Finalization function for GC per object in LispWorks.
"Uģis Lācis (as ugis dot lacis at equa dot se)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <GV3P280MB1420C901F79C8CD32C4BDDAC90C3A@GV3P280MB1420.SWEP280.PROD.OUTLOOK.COM> |
Dear LW users and developers, Continuing my work on our old codebase originally ran in AllegroCL 3.0, I have stumbled upon the following problem. Apparently, ACL (and also SBCL, if I understand correctly) allows defining special clean-up functions for objects: ACL: (add-finalization my-stream #'close) SBCL: (sb-ext:finalize object (lambda () (release-handle handle))) SBCL 2.5.10 User Manual<https://www.sbcl.org/manual/#Finalization> Looking for analogous option in LispWorks, closest thing I have found is (hcl:add-special-free-action<https://www.lispworks.com/documentation/lw81/lw/lw-hcl-3.htm>), however it is global and requires tagging the objects for special clean-up. I this the only option we have in LispWorks, or is there something that is closer to ACL/SBCL that I have not managed find? Best wishes, Ugis