Article View: comp.lang.clos
Article #323Re: How to neatly destroy instances?
From: Jon L White
Date: Tue, 13 Oct 1992 15:48
Date: Tue, 13 Oct 1992 15:48
32 lines
1890 bytes
1890 bytes
re: Date: Tue, 13 Oct 1992 14:20:31 GMT
From: huangp@wasser.Colorado.EDU (PeiYu Huang)
. . .
Because I use a class variable list to maintain all current instances
of that class for browsing purpose. One can use a form in an
"initialize-instance :after" method to update the list. I guess I may
need to define another method to clean up the list BEFORE destroying the
instance, say my-instance, otherwise when my-instance becomes unbound, I
can no longer access the list via it.
Any comments?
Date: Tue, 13 Oct 1992 13:40:40 GMT
From: jeff@aiai.edinburgh.ac.uk (Jeff Dalton)
. . .
Now, one thing that didn't happen in X3J13's revision of Common
Lisp was changes to garbage collection to support such things
as finalization and weak pointers. I think it was reasonable
not to do this, but I want to add my voice to those saying
"we want it" in the hope that implementors will be influenced.
A "weak-set" is surely the obvious choice, when there is an automated
garbage colllector, for keeping around a list of all instances of a class.
Lucid's 4.1 release ("on your Sparc desk ``next week'') has both
finalization and weak pointers as first-class, documented facilities;
and I know other vendors have some, possibly undocumented, versions of
such things too.
-- JonL --
Technical Details
Message-ID:
<9210131548.AA07390@kuwait.lucid>Path:
arc1-ca.pugleaf.net!sparky!uunet!pmafire!mica.inel.gov!ux1!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lucid.com!jonl%kuwaitShow Full Headers
Complete Article Headers
Newsgroups: comp.lang.clos Path: arc1-ca.pugleaf.net!sparky!uunet!pmafire!mica.inel.gov!ux1!news.byu.edu!hamblin.math.byu.edu!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!lucid.com!jonl%kuwait From: jonl%kuwait@lucid.com (Jon L White) Subject: Re: How to neatly destroy instances? Message-ID: <9210131548.AA07390@kuwait.lucid> Sender: daemon@cis.ohio-state.edu Organization: The Ohio State University Department of Computer and Information Science Date: Tue, 13 Oct 1992 15:48:17 GMT Lines: 32