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();
}


--
Robert Walker
[EMAIL PROTECTED]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to