This wasn't a bug, rather the way DataContext was originally designed
(it was assumed that it won't have a life-span longer than say a web
session). As I mentioned in the other message, we stopped making this
assumption and object retaining policy was redesigned in 3.0.
A bit OT for this thread, among other things this new behavior means
that a single DataContext can be shared by multiple threads for read-
only database access. Great for many high-performance session-less apps.
Andrus
On Jul 23, 2007, at 5:16 PM, Peter Schröder wrote:
afaik that this was a bug related to weak-references
-----Ursprüngliche Nachricht-----
Von: Jean-Paul Le Fèvre [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 23. Juli 2007 16:05
An: [email protected]
Betreff: Re: AW: Out of memory exception when creating a large
number of objects
On Monday 23 July 2007 15:53, Peter Schröder wrote:
i think that this is a dataContext-issue. every commited object
stays in
the context, so you probably should create a new dataContext at
some point.
Sure ! but is it a bug or a feature ?
The following methods :
ctxt.getObjectStore().unregisterNewObjects();
ctxt.getObjectStore().startTrackingNewObjects();
are meant to avoid the problem but it turns out that they likely
forget
references in some unknown places.
--
___________________________________________________________________
Jean-Paul Le Fèvre * Mail : [EMAIL PROTECTED]