Re: Out of memory
Re: Out of memory
- Subject: Re: Out of memory
- From: Miguel Arroz <email@hidden>
- Date: Thu, 29 Nov 2007 19:46:20 +0000
Hi!
On 2007/11/28, at 18:36, Chuck Hill wrote:
The ways of WO are many and mysterious. :-)
Indeed.
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?
Other than that, I'd try something like Shark (Xray now?).
xRay apparently is even worse for Java than shark. The only
"instrument" on it related to Java is Java Threads...
I used jconsole. It's right here on my mac (and yours!), it
doesn't to the graph I wanted (who references who) but it shows a
nice graph of the memory usage. As I could fix the problem without
that graph, I'm off the hook, but I surely would like to find a (free/
not very expensive for a newbie independent developer!) tool that
would provide me the references graph.
Yours
Miguel Arroz
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