Telerik® JustTrace™ by Progress

The EventHandler Analysis view tracks if there are types used only as delegate targets. In other words, this analysis shows all types with chains between them and GC roots going through delegate. In most of the scenarios this could be a potential memory leak.

To see these types in the Type List, enable them by pressing the Event Handler Leaks button (show Types From Eventhandler Analysis button) in the ribbon. Then, you will be able to distinguish them by the icon in the type list: show Types From Eventhandler Analysis icon

How to decide if the analysis results are indications for memory leaks or not

The EventHandler Analysis separates the possible issues to four types:

leak-warning eventhandlerThis type has instances, directly rooted through an EventHandler - This happens when there are instances only used as an EventHandlers target and as such, they are not accessible from any other root without going through a delegate. It is very likely for such reference chain (EventHandler - Instance) to produce a memory leak.
leak-warning delegateThis type has instances, directly rooted through a delegate - This happens when there are instances only used as a delegates target and as such, they are not accessible from any other root without going through a delegate. It is very likely for such reference chain (delegate - Instance) to produce a memory leak.
minor-warning eventhandlerThis type has instances, indirectly rooted through an EventHandler - This is just a warning. However, it is good to check if the issue can be ignored or a code refactoring is needed.
minor-warning delegateThis type has instances, indirectly rooted through a delegate - This is just a warning. However, it is good to check if the issue can be ignored or a code refactoring is needed.

Getting started with the EventHandler Analysis view

The Just My Types toggle button filters out all types which are not user code. You can control which assemblies are considered user code in the Assembly List view.

By double clicking on a type or by clicking the Instances icon in the ribbon, you can open a new tab with the Instances List view to examine all objects of the selected class.

Event Handler Analysis Main View

Each row of the table holds the following information:

  • Class Name - fully qualified name of the type.
  • Instances - number of alive instances of this type at the moment the snapshot was taken.
  • Total Retained Size - the sum of the retained sizes of all instances.

See Also