NDepend rule for "Dispose objects before losing scope"

217 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 answers

0
Patrick from NDepend team 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: