Re: put ec.revert() in the main class of all components
Re: put ec.revert() in the main class of all components
- Subject: Re: put ec.revert() in the main class of all components
- From: Nathan Dumar <email@hidden>
- Date: Tue, 3 Aug 2004 10:56:54 -0400
KB,
revert()? That "restores updated objects to their last committed
values", losing all changes to EOs. You only mentioned freeing some
used memory as the desired outcome.
If you just want to free up the memory used by an ec you've created,
*and you're done using the ec*, you can also do ec.dispose(). If you
don't do the dispose(), it will by done by the JVM eventually, but in
its own good time. The JVM automatically does garbage collection on
objects that are no longer being used.
I don't think it would be a good idea to dispose() the
defaultEditingContext. Only dispose() the ec objects that you created.
Nathan
On Aug 2, 2004, at 7:35 AM, Goh Keng Boon wrote:
Hi, is it common to put ec.revert() in the main class of all the
components? I find it always cache unwanted data inside, and i need
a quick hack for this. Can i just put ec.revert() in order to revert
everything (clear the editing context) in every page? or there is a
better practice that i can follow?
Thanks.
KB
_______________________________________________
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.