This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Pseudo-weak?


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"))

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]