Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Memory Analyzer » toString a LinkedList(Java Collections > Extract List Value fails with a NullPointerException - is OQL possible )
icon4.gif  toString a LinkedList [message #1710617] Thu, 08 October 2015 00:34
Faraz Ali is currently offline Faraz AliFriend
Messages: 2
Registered: October 2015
Junior Member
MAT is an awesome tool - I've used it many a time to be able to identify memory leaks - so thanks !
I am trying to analyze a heap dump where I have already identified the dominator. It is a series of LinkedLists that contain some custom objects which retain a large number of Strings in memory. What I'm trying to do is figure out the actual content of the Strings contained in the list, because if the content was what we expected it to be, then we would be purging these entries from the list and the heap would not get exhausted.
When I try to use the Java Collections > Extract List Values to inspect what is in the java.util.LinkedList, i receive a NPE. I know that the list is not empty, because it is retaining about 3.69 MB.
Upon further inspection I realized that the list is not a list of Strings' but a list of our custom objects, which in turn contain Strings. This made me think - wouldn't it be nice if i could write some java code that basically iterated over this LinkedList, and toString all the objects in this class, so that i could inspect it. Would extract_list_values do this? Is there an OQL way to do this ?

Previous Topic:How to retrieve objects which implements interface!
Next Topic:Numerical values are not shown in Dominator Tree
Goto Forum:
  


Current Time: Tue Sep 25 03:47:36 GMT 2018

Powered by FUDForum. Page generated in 0.01334 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top