• 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: Out of memory
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Out of memory


  • Subject: Re: Out of memory
  • From: Mike Schrag <email@hidden>
  • Date: Thu, 29 Nov 2007 21:01:40 -0500

The problem was that I was creating another context inside the cycle (in a called method) and copying some objects to it, trying to save, catching OL exceptions, etc. It's that technique I described on my blog: create very very localized EC, do stuff on it, try to save, if it goes wrong, trash the EC, create new EC, try again, etc.

Well, that EC was not being disposed. I disposed it, and suddenly memory usage did not grow any more.

Now, why did it worked is what I don't understand. Shouldn't ECs be disposed and discarded automatically, by the GC, as soon as they are not referenced any more? Or does that happen only on the end of the RR cycle? Or what?
You're using Wonder, right? I think it pushes EC's into a ThreadLocal so it can do automatic unlocking for you, which means it will not be eligible for GC. I think that should be switched to a Weak(List/Set/ whatever) so that it doesn't hold onto it if it's the last one and just let it GC. I don't exactly know what the unlocking semantics of that should be ...

ms

_______________________________________________
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: Out of memory
      • From: Miguel Arroz <email@hidden>
    • Re: Out of memory
      • From: Simon McLean <email@hidden>
References: 
 >Out of memory (From: Miguel Arroz <email@hidden>)
 >Re: Out of memory (From: Chuck Hill <email@hidden>)
 >Re: Out of memory (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: EO lastModifiedTS @ validateForUpdate?
  • Next by Date: Re: split view of Java files in Eclipse
  • Previous by thread: Re: Out of memory
  • Next by thread: Re: Out of memory
  • Index(es):
    • Date
    • Thread