What's a POS?? (fwd)

BRIAN SPILSBURY zhivago@iglou.com
Fri, 9 May 1997 14:04:47 -0400 (EDT)

> I agree with Mike. An OOFS is important, but I don't think that it is
> important that it be transparent. The app knows what is important to
> save and how often to save it. Although I might happen to have a pointer
> to something hanging around I might not want to save it. And what if
> there is a large object I want to delete to save disk space but I don't
> know where the references to it are? Do I have to search all references
> to find out which point to it? Or does the OS store a reverse lookup
> table from referenced objects to references to it.
> I can see the ease-of-programming benefits of a transparent OOFS but I
> don't think that the GC abstraction extends naturally to persistent data
> on (perhaps small) hard disks.

Unless you think that writing code with memory leakage is good then this
is a bit of a silly objection. Lisp code needs to organise its data
such that it can be unlinked from the live set easily.

I think that weak-references will solve your issues in pretty much all
cases with a little design. A weak reference being a refence that does not
protect from garbage collection, and will be redirected to nil if the
object its referencing gets collected.

If your example is a fs example, then yes, it should hang around until
everything that _needs_ it doesnt' want it anymore.

Things that don't _need_ it, but just _like_ it, can use weak-references.

I may have missed the point, if so, please give an example that these
don't cover.