durusmail: durus-users: My wish-list for Durus 3.6 (20060922)
My wish-list for Durus 3.6 (20060922)
2006-09-22
2006-09-22
2006-09-22
2006-09-26
2006-09-26
2006-09-26
2006-09-27
2006-09-29
2006-09-29
My wish-list for Durus 3.6 (20060922)
David Binger
2006-09-27
On Sep 22, 2006, at 2:23 PM, Jesus Cea wrote:

> Nevertheless I sometimes use "connection.get()" like a "weak
> reference"
> between objects. That is, instead of keeping an object link, I keep an
> object OID and then I try to access it just like a python weak
> reference. This "weak reference" doesn't preclude the object of being
> garbage collected, like usual "weak references". The usage case is the
> same that python weak references: keeping references to objects
> without
> precluding garbage collection.

We can fix get() so that it goes ahead and loads the state when it has
to load the object record.

I don't like this weak-reference pattern, though.  I don't think the
application-level data should depend in any way on the value of an oid.
I recommend that you find an alternative that does not depend on oids.



reply