🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.clos
Article #418

Re: accessing clos objects

#418
From: Jeff Dalton
Date: Wed, 13 Feb 1991 11:42
23 lines
1463 bytes
> In article <1991Feb11.223240.20960@Think.COM> barmar@think.com (Barry Margolin) writes:
> Some Common Lisp vendors (e.g., Symbolics) offer some form of "weak
> reference" - a way to refer to an object without protecting it from
> GC.  Using weak references to keep track of extant instances avoids
> the need for explicit de-allocation.

A good point.

However, there is a problem with using weak reference for named
objects.  One of the points of having names is that the user can refer
to the object by name.  If weak links are used, the reference from the
name will cease to work once there are no more real pointers to the
object in the Lisp system.  But there may still be pointers (so to
speak)in the user's head.

Suppose I create an object named BILL, and don't do anything with
it for a while.  It gets gc'd and when I get around to trying to
use it, it's gone.

Of course, weak links are often just what you want when keeping
track of  all instances of some class.

-- Jeff
Technical Details
Message-ID: <25089.9102131142@subnode.aiai.ed.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!aiai.edinburgh.ac.uk!jeff

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!aiai.edinburgh.ac.uk!jeff
From: jeff@aiai.edinburgh.ac.uk (Jeff Dalton)
Newsgroups: comp.lang.clos
Subject: Re: accessing clos objects
Message-ID: <25089.9102131142@subnode.aiai.ed.ac.uk>
Date: 13 Feb 91 11:42:37 GMT
Sender: welch@tut.cis.ohio-state.edu
Distribution: inet
Organization: CommonLoops Mailing List
Lines: 23