cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Gentry <>
Subject Weak References
Date Wed, 14 Jul 2010 12:44:01 GMT
I'm a little weak, if you will, on how the weak references in 3.0
work.  I know the object store has a weak reference to the data
objects, but how does that work the other way around?  For example, if
I do something like (pseudo-code):

void init()
  DataContext dc = DataContext.createDataContext();
  foo = dc.newObject(Foo.class);

Is the DataContext created in danger of going away even though I have
a handle to the foo object?  Is it always safe to call
foo.getObjectContext() later and get that DC?



View raw message