Re: Out of memory
Re: Out of memory
- Subject: Re: Out of memory
- From: Miguel Arroz <email@hidden>
- Date: Fri, 30 Nov 2007 13:18:50 +0000
Hi!
Well, I strongly support that change! I don't think the locking
semantics will be a problem (even if the context gets unlocked before
being GCed, who cares), but I only thought about this less than 10
seconds... :) It's not a really urgent change because, as you said,
it only causes problems with mass EO creation, which is a very
specific and uncommon situation. But if it could be solved, it would
be cool.
Yours
Miguel Arroz
On 2007/11/30, at 02:01, Mike Schrag wrote:
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:
40guiamac.com
This email sent to email@hidden
Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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