This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Pseudo-weak?
- To: guile at sourceware dot cygnus dot com
- Subject: Pseudo-weak?
- From: forcer <forcer at mindless dot com>
- Date: Mon, 27 Sep 1999 04:09:44 +0200
Is it possible to designate function to be called when an object
isn't referenced anymore except for one (some?) "pseudo-weak"
locations? E.g. the same behavior as with weak references, except
that the object does not get garbage collected.
I'm trying to implement a cache for database connections. My
"problem" with that is that it should be transparent, e.g. one
shouldn't have to free the connection to give it back to the
cache.
This would be possible on the C-level, e.g. to dynamically build
smobs of those database connections, and return them to the cache
upon smob collection, but i'd like to do them on the Scheme
level.
Any ideas?
-forcer
--
((email . "forcer@mindless.com") (www . "http://forcix.cx/")
(irc . "forcer@#StarWars (IRCnet)") (gpg . "/other/forcer.gpg"))