Re: Refreshing objects
Re: Refreshing objects
- Subject: Re: Refreshing objects
- From: Nathan Dumar <email@hidden>
- Date: Wed, 12 May 2004 11:52:11 -0400
Here's the info on the dispose() method:
http://developer.apple.com/documentation/WebObjects/Reference/API/com/
webobjects/eocontrol/EOEditingContext.html#dispose()
Currently, the only time I use the dispose method is when I need to
access the recent saves immediately, since it unlocks and breaks
connections (etc, see the ref). Even within the same application,
recently saved objects will not show up unless I do a dispose() first,
from the component that made the save. I put it in the methods that
call up other components, so I'm sure I won't be needing it for
something else on the same page.
The more I think about it, the more I convince myself that this would
be a good memory saver. I've read that Java is supposed to do this
type of clean-up on its own, but apparently it doesn't get around to
doing it for a while. I don't have a while to wait for the information
to become available, so I force the garbage collection.
It may disrupt backtracking ... not sure, since I don't use
backtracking.
Nathan
On May 12, 2004, at 11:37 AM, Arturo Perez wrote:
Nathan Dumar wrote:
In a different situation, I've had great success by not using
this.session().defaultEditingContext()
Instead, create a new editing context, then after saving changes, do
ec.dispose()
(maybe in the functions that go to other pages).
Nathan
I do something similar but I don't do the ec.dispose(). What does
doing the dispose trigger? IOW, should I go back to my code and add
disposes?
-arturo
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.