Re: {Filename?} Memory Leak?

From: Justin Deutsch (justin.deutsc..elevance.com.au)
Date: Sun Oct 31 2004 - 17:04:53 EST


Thanks for the tip. Creating a new context when I flush the database
log entries seems to have worked.

On 29/10/2004 10:34 AM, Andrus Adamchik wrote:
>>I'd recommend creating a new context between batches.
>>Otherwise you'll at minimum end up with Fault representations of each
>>object
>>if not the full object.
>
>
>
> I think this is the essence of the problem. Here is a simplified
> diagram of Cayenne access stack:
>
> http://objectstyle.org/cayenne/userguide/design/access.html
>
> While shared cache at the DataDomain level (see the diagram) has an
> upper limit on the number of entries settable in the modeler,
> DataContext-level cache (aka ObjectStore) doesn't have one, as
> DataContexts are user-managed. So it will grow indefinitely, even
> though you commit your batches... So create a new instance of
> DataContext in the end of the "flush" method (and also make sure you
> don't have any reused DataObject ivars that point to the old
> DataContext, or transfer them to the new one using
> DataContext.localObjects(..)).
>
> Andrus
<snip>

-- 
Justin Deutsch

Relevance... because results count

Relevance Phone: +61 (0)2 6241 6400 A.B.N. 86 063 403 690 Fax: +61 (0)2 6241 6422 Unit 11, Mobile: +61 (0)40 246 55 88 Cnr Brookes & Heffernan Sts, E-mail: Justin.Deutsc..elevance.com.au Mitchell ACT 2911 Web: http://www.relevance.com.au



This archive was generated by hypermail 2.0.0 : Sun Oct 31 2004 - 17:05:15 EST