i have to review a code made by some other person that has some memory leaks. Right now i'm searching the disposable objects to enclause them with the using statement and i would like to know if there is a quick way that tells you all the disposable objects declared in. I mean something like resharper or another visual studio plugin.
thanks.
I know what you mean. I don't know, but look at FxCop. It might have a rule in there somewhere that checks whether objects implementing IDisposable are not disposed. Just a hunch, mind.
UPDATE: Mitch Wheat writes:
FxCop includes the rule, thats says all types that derive from types that implement IDisposable should implement the Dispose() pattern
Thanks, Mitch.
You could do this with ReSharper. With ReSharper you can navigate implementations of any interface with ease by using Alt-End, but for a popular interface such as IDisposable
this is not practical.
Here's what you could do:
System.IDisposable
IDisposable
. Those in bold are the ones you want - they implement IDisposable
directly.Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With