Re: Deleting objects causes OutOfMemory...
Re: Deleting objects causes OutOfMemory...
- Subject: Re: Deleting objects causes OutOfMemory...
- From: Robert Walker <email@hidden>
- Date: Wed, 16 May 2007 16:24:30 -0400
Here's one more thing that I can see taking a look at ds()....
The objects in this array are "likely" getting copied in memory 3 times.
1. The ds() fault fires fetching data and creating EOs for each object in the array.
2. dObjs is a full copy of the ds() array.
3. dObj is creating a third copy of each object likely before the garbage collection thread has time to take care of the dereferenced objects.
It would be useful to know, on average, how many objects are contained within ds()? On May 16, 2007, at 11:25 AM, Shravan Kumar.M wrote: public void deleteDs(){ NSArray dObjs = new NSArray(ds());//ds is a to-many relationship from A to D , A ---->> D
for ( int i=0, count= dObjs.count(); i < count; i++ ) { D dObj = (D) dObjs.objectAtIndex(i); removeObjectFromBothSidesOfRelationshipWithKey(d, "ds"); }
editingContext().saveChanges(); }
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden