[ZODB-Dev] weak references?

Bob Ippolito bob at redivi.com
Tue Feb 3 12:28:59 EST 2004


On Feb 2, 2004, at 10:42 PM, Jeremy Hylton wrote:

> On Mon, 2004-02-02 at 14:23, Bob Ippolito wrote:
>> Does ZODB have any support for something like a weak reference?  I 
>> have
>> a few ideas for applications that I'd like to develop using ZODB, and
>> some of them may benefit from weak references.  Of course, they're not
>> necessary, but I think it could simplify things.
>
> Funny that you ask now.  Jim implemented a version recently that is
> slated for ZODB 3.3.  It's in CVS, perhaps on a branch, but was not in
> the last alpha release.
>
> Can you tell us about the use cases for weak references?  A persistent
> weak reference is a bit of an odd thing.  It doesn't go away until the
> object is unreachable in the database (as opposed to unreachable in the
> current process).  Is that what you had in mind?

Yeah, the persistence thing is what I had in mind.

I was thinking specifically about relations between objects in the 
database.  A is related to B would be a weak reference; when B goes 
away (and it should, because this relationship shouldn't keep B alive), 
the relationship should too.

I was also thinking it might be possible to do something like extents 
(slowly?) with lists/sets of weak refs... which would at least be good 
for early development, if not production.

-bob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2357 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zodb-dev/attachments/20040203/8b1ee7c3/smime.bin


More information about the ZODB-Dev mailing list