NDepend rule for "Dispose objects before losing scope"

233 Views Asked by At

I'm evaluating NDepend as a part of an effort to enforce code quality and correct framework usage, and I am looking for a way to write the equivalent of CA2000: Dispose objects before losing scope. Anyone else has tried to do this, or has knowledge about how to do it?

1

There are 1 best solutions below

0
On

This rule is not implementable through NDepend because the context is inside method body. NDepend is more about writing code rules concerning the program structure like for example: