Features

List of features currently provided by my additions to MAT:

Find all instances of Frames/Dialogs

In a Swing Application Frames / Dialogs get opened and closed.

To find all of those in the Heap you can look for them but you also have to know which Subclasses there are…

This Query will find them all and show an outgoing listing.

MAT_ADDITIONS_SWING_INSTANCES_MENU MAT_ADDITIONS_SWING_LIST_FRAMES

Find possible leaking Frames/Dialogs

Normally you use a DefaultCloseOperation on a Frame or Dialog.

And you would call dispose on them if needed. But i often found: this did not always happen. So Frames and specifically Dialogs were still kept in the Heap and were hold by native resources. Finding them was digging through the heap and did cost time. So with this Query Frames / Dialogs that are not visible but have a open native peer (probably not called dispose on them) will be listed.

MAT_ADDITIONS_SWING_MENU_LEAK_IDENTIFICATION

MAT_ADDITIONS_SWING_POSSIBLE_LEAKING_FRAMES_DIALOGS

Extract Components of Container

Not knowing where a Frame has come from the easiest way sometimes to find the source to identify it was looking at the components it was made of.

But clicking through a deep hierarchy of components takes time and a lot of clicks.

So these two contextmenuqueries can extract the direct subcomponents (e.g. root pane of the frame) or all subcomponents in the hierarchy and list them. With this it gives the ability to easier identify where the frame could be created/used.

MAT_ADDITIONS_SWING_CONTEXTMENU_SUBCOMPONENTS

MAT_ADDITIONS_SWING_DIRECT_SUBCOMPONENTS_OF_CONTAINER  MAT_ADDITIONS_SWING_ALL_SUBCOMPONENTS_OF_CONTAINER

Show Additional Information for Components / Frames

As you may have already noticed, NameResolvers have been added to provide better information for instances of Swing in MAT.

MAT_ADDITIONS_SWING_POSSIBLE_LEAKING_FRAMES_DIALOGS

In this example you can see that title / visible / name or if a Dialog is modal are directly presented on the instances. Looking up this often required information in mostly over 100 fields takes time. Now you can find it directly.