Disposable Types Classification and Undisposed Instances

When presenting analysis issues regarding undisposed instances, .NET Memory Profiler needs information about what would have been performed if the instance was correctly disposed. This information is provided by classifying the actions that are performed when disposing instances of the type. The actions are classified as:

      Release resource

Disposing instances of this type might release unmanaged resource instances.

      Detach events

Disposing instances of this type might detach event handlers from external instances.  If the external instance has a longer lifetime than the disposable instance, failing to dispose the disposable instance can cause a memory leak.

      Remove external references

Disposing instances of this type might remove references to the disposable instance from external instances. If the external instance has a longer lifetime than the disposable instance, then failing to dispose the disposable instance can cause a memory leak.

      Dispose other instances

Disposing instances of this type might cause other instances to be disposed.

      Release COM interfaces

Disposing instances of this type might cause COM interface wrappers (CCWs and RCWs) to be released.

      Perform cleanup/exit action

Disposing instances of this type might cause some cleanup or exit action to be performed. This action can for instance be flushing data to a file, committing or reverting a transaction, clearing security buffers, or deleting temporary files.

      Suppress finalization

Disposing instances of this type will suppress the finalization of the instance (i.e. GC.SuppressFinalize will be called).

      Clear references

Disposing instances of this type might clear references to other instances.

.NET Memory Profiler provides classifications for all disposable types that are included in .NET Framework 2.0/3.0/3.5. The classifications have not yet been updated for .NET Framework 4.0.

If a classification for a specific disposable type cannot be found, .NET Memory Profiler will search for a base type with dispose classification for. If base type classification is used, the text (inherited) will be appended to the type when presented by the profiler.