• 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: disposing components
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: disposing components


  • Subject: Re: disposing components
  • From: Sacha Mallais <email@hidden>
  • Date: Fri, 10 Jun 2005 15:03:59 -0700

On Jun 10, 2005, at 2:42 PM, Florijan Stamenkovic wrote:

On Jun 10, 2005, at 19:17, Sacha Mallais wrote:

Your method will work. Of course, you don't have to discard the EC or its contents. Just let the EC, its contents and the page reside in the page cache until the page gets expired out of the cache, at which point the EC will be disposed of automatically.

Yup, this is what I was wondering about. If it is going like that or if that in-the-air-hanging ec should be manually disposed of.



This method allows user backtracking (edit stuff on page A, visit page B in the middle of editing, go back and hit submit on page A).

Didn't consider it. But what is happening in my AddRecordPage component in the disposePage() action is that I reset the ec and then sleep() is disposing and setting the pointer to null (could do it all in the disposePage() as well though). So, then that instance of the component becomes unusable because it has a null pointer as it's editing context.


If you keep page cache enabled, make sure the page can be rendered with a null EC, in case the user back tracks to that page...


Well, the solution would be to disable component cashing??? Will look into it...

That's one way, take a look at WOApplication.setPageCacheSize(). I prefer using the cache (and I prefer keeping things simple...), so I would just change the disposePage to not dispose the EC code -- unless you're worried about memory, this is the way to go. Yet another way would be to disable caching for that page only. And yet another would be to cache the page, but instantiate a new EC when/if the user back tracks.



sacha

_______________________________________________
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


  • Follow-Ups:
    • Re: disposing components
      • From: Florijan Stamenkovic <email@hidden>
    • Re: disposing components
      • From: Nathan Dumar <email@hidden>
References: 
 >disposing components (From: Florijan Stamenkovic <email@hidden>)
 >Re: disposing components (From: Sacha Mallais <email@hidden>)
 >Re: disposing components (From: Florijan Stamenkovic <email@hidden>)

  • Prev by Date: Re: disposing components
  • Next by Date: Re: Error When Deleting from different session
  • Previous by thread: Re: disposing components
  • Next by thread: Re: disposing components
  • Index(es):
    • Date
    • Thread