For Programmers: Free Programming Magazines  


Home > Archive > Java Help > April 2004 > Java memory leak









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Java memory leak
Howard Rubin - change nospam to nyx

2004-04-27, 12:18 pm

I'm working on resolving the final few issues on an applet that
was written by someone else (that'd be new) and one that's been
very difficult so far is that on certain VMs (sun, mac 1.4) its
memory usage continuously increases, while on others (M$, mac 1.3)
no memory leaks at all. I've searched on google and also tried
commenting out areas of code, but haven't really gotten anywhere
with either approach.

Since the leak occurs only on some VMs and not on others, it seems
unlikely that the problem is in the applet, but it's a little hard
to believe that two independent VMs (sun & mac 1.4) would have the
same problem.

Anyone have any ideas how I might track this down?

Thanks,
Howard Rubin
Roedy Green

2004-04-27, 2:10 pm

On 27 Apr 2004 09:16:57 -0600, hrubin@nospam.net (Howard Rubin -
change nospam to nyx) wrote or quoted :

>
>Since the leak occurs only on some VMs and not on others, it seems
>unlikely that the problem is in the applet, but it's a little hard
>to believe that two independent VMs (sun & mac 1.4) would have the
>same problem.


see http://mindprod.com/jgloss/packratting.html
http://mindprod.com/jgloss/profiler.html

I would check that dispose is used any time you close a frame you
don't plan to reopen soon.

see http://mindprod.com/jgloss/frame.html
http://mindprod.com/jgloss/jframe.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Stewart Gordon

2004-04-28, 1:53 pm

Roedy Green wrote:

<snip>
> see http://mindprod.com/jgloss/packratting.html
> http://mindprod.com/jgloss/profiler.html
>
> I would check that dispose is used any time you close a frame you
> don't plan to reopen soon.

<snip>

FWIG there are actually true memory leaks when a frame has been closed
and all references indeed removed, but through having not been disposed
becoming an unreachable object doing nothing but taking up both memory
and native resources.

Stewart.

--
My e-mail is valid but not my primary mailbox, aside from its being the
unfortunate victim of intensive mail-bombing at the moment. Please keep
replies on the 'group where everyone may benefit.
Howard Rubin - change nospam to nyx

2004-04-30, 1:21 pm

I just got off the phone with Compuware, talking to them about
their boundschecker like product for java called Devpartner Java
http://www.compuware.com/products/devpartner/java.htm

Has anyone used this product? What were your impressions?
Compuware says it'll find the leak whether it's in the VM or
the applet. Does that sound right?
It seems kind of expensive. Anybody have a transferable license available?

Thanks,
Howard Rubin
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com