Cannot find HashSet in Main Thread [message #666498] |
Wed, 20 April 2011 15:30  |
Eclipse User |
|
|
|

I am unable to locate my memory leak. Is this a ThreadLocal thing? I don't have any HashSet in my Main Thread. Is there a better way to locate the source of the memory leak?
|
|
|
Re: Cannot find HashSet in Main Thread [message #666518 is a reply to message #666498] |
Wed, 20 April 2011 16:28   |
Eclipse User |
|
|
|
Hi,
The <java local> means that somewhere on the callstack of the main thread there is a local object of type HashSet which is pretty big. And by local I mean either a local variable in some of the methods, or an object passed as a parameter in some of the methods being executed.
I think it may be helpful to:
- look at the content of the Set - from the report you can open the objects and further explore them manually
- look at the stacktrace. It depends on the VM that generated the heap dump if stacktrace information is inside. JDK 1.6 dumps have it, 1.5 don't. IBM system dumps also have thread stack info. Just try to open the object, then select from the context menu "Java Basic" -> "Thread Stacks"
Let me know if this hints help.
Krum
|
|
|
Re: Cannot find HashSet in Main Thread [message #666778 is a reply to message #666518] |
Fri, 22 April 2011 13:04   |
Eclipse User |
|
|
|
Thank you, this helps a bit. I still can't find why the objects are not being released, and where they are coming from.
I really need to get the Thread Stack info to determine this. I tried using JRE1.6 but nothing shows up when I view the Thread Stack.
I used jre1.6.0_01\bin\javaw.exe
Any suggestions?
|
|
|
|
Powered by
FUDForum. Page generated in 0.04427 seconds