• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: put ec.revert() in the main class of all components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >put ec.revert() in the main class of all components (From: Goh Keng Boon <email@hidden>)

  • Prev by Date: Re: WebObjects install can't find JDK
  • Next by Date: Re: Subversion and Webobjects
  • Previous by thread: put ec.revert() in the main class of all components
  • Next by thread: Re: attempt to assign value to unknown key
  • Index(es):
    • Date
    • Thread