Analysis Issues List

The following issues are currently detected by the memory analyser. Additional issues will be added in updates of .NET Memory Profiler. Suggestions for additional issues that should be detected by the memory analyser can be sent to memprofiler@scitech.se.

 Error

      WPF binding source memory leak

An instance that is the source of a WPF binding where the instance class does not implement INotifyPropertyChanged has been detected. The target of the binding is reachable from the source instance, which will cause a memory leak. To fix this issue, INotifyPropertyChanged should be implemented for the type, or the binding should be changed to a OneTime binding. To find out how the source and target are connected, use the Expand path link in the issue information. For more information, see Microsoft KB938416.

      WPF binding target memory leak

Same as WPF binding source memory leak but this issue is assigned to the target of the binding.

  Serious warning

      Potential memory leak

An instance has been detected as a potential memory leak by a memory assertion. For more information about memory assertions, see Use Assertions to Detect Memory Leaks. This issue cannot be ignored. To remove this issue, either correct the memory leak, or, if it is a falsely identified memory leak, modify the memory assertion so that the instance is not included.

      Disposed instance with direct EventHandler roots

A disposed instance is directly rooted by an EventHandler, i.e., the instance is only used as the target of an EventHandler and it cannot be reached from any other root without passing through a delegate. Since a disposed instance should no longer be used and EventHandlers are a common cause of memory leaks, this issue is a strong indication of a memory leak.

      Disposed instance with EventHandler roots via closure

Same as Disposed instance with direct EventHandler roots, but the instance is held by a closure instance, and it is the closure instance that has a direct EventHandler root. This can occur when adding an EventHandler using an anonymous method (e.g. when using a lambda expression).

      Disposed instance with direct delegate roots

A disposed instance is directly rooted by a delegate, i.e., the instance is only used as the target of a delegate, and it cannot be reached from any other root without passing through a delegate. Since a disposed instance should no longer be used and delegates s are a common cause of memory leaks, this issue is a strong indication of a memory leak.

      Disposed instance with delegate roots via closure

Same as Disposed instance with delegate roots via closure, but the instance is held by a closure instance, and it is the closure instance that has a direct delegate root. This can occur when adding a delegate using an anonymous method (e.g. when using a lambda expression).

      Undisposed instances (release resource, no finalizer)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might have released an unmanaged resource. The type of the instance has no finalizer, so failing to dispose the instance can cause an unmanaged resource leak. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

      Instances queued for finalization (excessive finalization or finalizer stuck)

An instance was queued for finalization at the start of the snapshot and has not been finalized at the time the snapshot collection finished. This can indicate that too many instances are being finalized, that the finalizers take too long time to execute, or that a finalizer is stuck (e.g. a dead-lock). This issue can also occur if an instance is being re-registered for finalization without assigning a strong reference to it.

 Warning

      Potential WPF binding source memory leak

An instance that is the source of a WPF binding where the instance class does not implement INotifyPropertyChanged has been detected. The target of the binding is reachable from the source instance, which may cause a memory leak. The target and/or source instance are reachable from other instances, so this is not a memory leak. However, unless the binding is removed before the references to the target and source are removed, this will become a memory leak.

To fix this issue, INotifyPropertyChanged should be implemented for the type, or the binding should be changed to a OneTime binding. To find out how the source and target are connected, use the Expand path link in the issue information. For more information, see Microsoft KB938416.

      Potential WPF binding target memory leak

Same as Potential WPF binding source memory leak but this issue is assigned to the target of the binding.

      Direct EventHandler roots

An instance is directly rooted by an EventHandler, i.e., the instance is only used as the target of an EventHandler and it cannot be reached from any other root without passing through an EventHandler. Since EventHandlers are a common cause of memory leaks, this issue can indicate a memory leak. Investigate the instance and the EventHandler instance to find out whether the instance is unintentionally held by the EventHandler, or if the issue can be ignored.

      EventHandler roots via closure

Same as Direct EventHandler roots, but the instance is held by a closure instance, and it is the closure instance that has a direct EventHandler root. This can occur when adding an EventHandler using an anonymous method (e.g. when using a lambda expression).

      Disposed instance

An instance is disposed but still reachable from one or more roots. Since a disposed instance should normally no longer be used, this can indicate a memory leak. Investigate the instance to find out whether the instance is unintentionally kept alive, or if the issue can be ignored.

      Undisposed instances (release resource and remove external references)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might have released an unmanaged resource and removed external references to the instance. Failing to dispose instances of this type can cause bad resource and memory utilization, and even memory leaks. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

      Undisposed instances (release resource)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might have released an unmanaged resource. Failing to dispose instances of this type can cause bad resource utilization. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

      Undisposed instances (remove external references)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might have removed external references to the instance. Failing to dispose instances of this type can cause bad memory utilization, and even memory leaks. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

 Minor warning

      Direct delegate roots

An instance is directly rooted by a delegate, i.e., the instance is only used as the target of a delegate and it cannot be reached from any other root without passing through a delegate. Since delegates are a common cause of memory leaks, this issue can indicate a memory leak. Investigate the instance and the delegate instance to find out whether the instance is unintentionally held by the delegate, or if the issue can be ignored.

      Delegate roots via closure

Same as Direct delegate roots, but the instance is held by a closure instance, and it is the closure instance that has a direct delegate root. This can occur when adding an EventHandler using an anonymous method (e.g. when using a lambda expression).

      Pinned instance

An instance is pinned in memory. Pinning instances prevents the garbage collector from moving the instance and will affect the efficiency of the garbage collector. If possible, pinning instances should be avoided. If it is not possible, then the instance should be pinned for as short period of time as possible.

      Instances queued for finalization

An instance is in the finalization queue when the snapshot is being collected. This can indicate that there is a problem with slow finalization, but it can also occur during normal operation.
This issue is only reported when the profiler has not been able to wait for finalizers to run, e.g. when importing a memory dump. Normally the profiler will try to wait for finalizers to finish and report the warning issue Instances queued for finalization (excessive finalization or finalizer stuck) or the informational issue Instances queued for finalization (pending finalizer) instead.

 Indirect warning

      Disposed instance with indirect EventHandler roots

A disposed instance is held by another instance that is directly rooted  by an EventHandler. A link will be provided to the he instance that is directly rooted by the EventHandler instance. Investigate the directly rooted instance to resolve this issue.

      Indirect EventHandler roots

An instance is held by another instance that is directly rooted by an EventHandler. A link will be provided to the he instance that is directly rooted by the EventHandler. Investigate the directly rooted instance to resolve this issue.

      Disposed instance with indirect delegate roots

A disposed instance is held by another instance that is directly rooted by a delegate. A link will be provided to the he instance that is directly rooted by the delegate. Investigate the directly rooted instance to resolve this issue.

      Indirect delegate roots

An instance is held by another instance that is directly rooted by a delegate. A link will be provided to the he instance that is directly rooted by the delegate. Investigate the directly rooted instance to resolve this issue.

      Instance indirectly rooted by finalizer queue

An instance is held by another instance that is rooted by the finalizer queue.  A link will be provided to the he instance that is directly rooted by the finalizer queue. Investigate the directly rooted instance to resolve this issue.

Suggestion-24 Suggestion

      WPF binding target with source that does not implement INotifyPropertyChanged

An instance, which is the source of a WPF binding where the instance class does not implement INotifyPropertyChanged, has been detected. This delays the garbage collection of the involved instances and increases the risk of a memory leak.

To fix this issue, INotifyPropertyChanged should be implemented for the type, or the binding should be changed to a OneTime binding. For more information, see Microsoft KB938416.

      WPF bindings with source that does not implement INotifyPropertyChanged

Same as WPF binding target with source that does not implement INotifyPropertyChanged but this issue is assigned to the target of the binding.

      Undisposed instances (perform action)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might have performed some exit or cleanup operation. This operation can for instance be flushing data to a file, committing or reverting a transaction, clearing security buffers, or deleting temporary files. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

      Undisposed instances (memory/resource utilization)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might dispose other instances, release COM interfaces, and suppress finalization. Failing to dispose instances of this type can cause bad memory and resource utilization. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

 Information

      ASP.NET session state summary

This issue presents summary information about ASP.NET session states. This includes information about how many session state instances exists, how many instances are held by the session state, and how many bytes are used by the held session state instances. Links are provided to the session state types, and all other types that have instances stored as session state.

      ASP.NET session key

An instance is used as, or is part of, an ASP.NET session state key.

      ASP.NET session value

An instance is used as, or is part of, an ASP.NET session state value.

      ASP.NET session state instance

An instance acts as a session state container. This is normally an instance of the InProcSessionState class.

      ASP.NET cache summary

This issue presents summary information about ASP.NET cache. This includes information about how many instances are held by the cache and how many bytes are used by the held cache instances. Links are provided to the types that have instances stored in the cache.

      ASP.NET cache key

An instance is used as, or is part of, an ASP.NET cache key.

      ASP.NET cache value

An instance is used as, or is part of, an ASP.NET cache value.

      Duplicate instances

An instance is part of a set of duplicate instances.
For more information, see Duplicate Instances Detection.

      FixedAddressValueType instance

An instance is pinned in memory using the System.Runtime.CompilerServicesFixedAddressValueTypeAttribute attribute. Pinning instances prevents the garbage collector from moving the instance and will affect the efficiency of the garbage collector.

      Large instance

An instance is stored in the large object heap.

      Undisposed instances (clear references)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance might clear references to other instances, but no additional operation will be performed. Since a disposed instance should normally no longer be used, clearing references from the instance should not affect the memory usage. Failing to dispose instances of this type will therefore not cause any performance or memory penalty. For more information about disposable types classification and undisposed instances, Disposable Types Classification and Undisposed Instances.

      Undisposed instances (no action)

A disposable instance has been garbage collected without being properly disposed. Based on the classification of disposable types, disposing the instance will not cause any action to be performed. Failing to dispose instances of this type will therefore not cause any performance or memory penalty. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

      Undisposed instances (unclassified)

A disposable instance has been garbage collected without being properly disposed. No information about the type of the instance is available, so the importance of disposing the instance cannot be determined. However, it is recommended that all disposable instances are properly disposed. For more information about disposable types classification and undisposed instances, see Disposable Types Classification and Undisposed Instances.

      Instances queued for finalization (pending finalizer)

An instance was queued for finalization when the snapshot was collected. Even though the instance is still queued for finalization, it will most likely be finalized soon.

 Indirect information

      Held duplicate instances

An instance is part of a set of duplicate instances that is held by another set of duplicate instances. For more information, see Duplicate Instances Detection.

Pending-24 Pending issue

      Possible duplicate instances

A set of instances are possibly duplicates of each other, but a full analysis of the instance graphs has not been performed. To get information about whether the instances are actually duplicates, use the “Detect duplicates” link. For more information, see Duplicate Instances Detection.

.NET Memory Profiler User Manual

© Copyright 2002-2017. SciTech Software AB.

For information about .NET Memory Profiler, see the product site at http://memprofiler.com

.NET Memory Profiler is developed by SciTech Software AB