Domanda

According MSDN, FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework common language runtime) and reports information about the assemblies, such as possible design, localization, performance, and security improvements.

Is there any predefined rules for FxCop, which can be used for discovering potential memory leak code?

UPDATE : Here is results of my investigation using ANTS Memory Profiler - link

It shows only unmanaged memory increased.. Maybe I'm using it not in a proper way. I will be glad for any suggestions

È stato utile?

Soluzione

FxCop is not the right tool to discover memory leak. It is something you use to make sure your code is following established guidelines.

There are a few memory Profilers available in the market .Net Memory Profiler, JetBrains dotTrace, ANTS Profiler from RedGate

Altri suggerimenti

FxCop has rules related to undisposed objects. Failing to call Dispose or otherwise (via using blocks) dispose of objects implementing IDisposable could potentially result in leaks. However, I would not consider FxCop a primary tool for identifying memory leaks.

These StackOverflow questions cover the topic of suitable tools created specifically for identifying memory leaks:

What strategies and tools are useful for finding memory leaks in .NET?

https://stackoverflow.com/questions/2259433/how-to-detect-memory-leaks-in-c-sharp-application

One of the tools I've used in the past is AQTime, which does both performance profiling and allocation analysis. The Standard version is free to use: http://smartbear.com/products/free-tools/aqtime-standard

The CLR Profiler is free and includes some memory profiling tools. Here is the one for .NET 4: http://www.microsoft.com/en-us/download/details.aspx?id=16273

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top