Re: Finalization function for GC per object in LispWorks.

"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
> On 7 Nov 2025, at 16:56, Uģis Lācis (as ugis dot lacis at equa dot se) <[email protected]> wrote:
> 
> I have stumbled upon the following problem. Apparently, ACL (and also SBCL, if I understand correctly) allows defining special clean-up functions for objects:

May I ask about the purpose of this? Is that equivalent to destructors in statically typed OOP languages?

Supposedly one does not need it in Lisp since stuff gets garbage collected and destroyed automatically, however indeed I found myself in situations where I needed to do something to an object when disposing of it (like closing a socket file descriptor, or something) because the GC likely won’t be able to.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.