I am looking for memory leaks in a huge code base so going line by line and observing for every possible location of where an IDisposable is used without being put in a using
statement or without being disposed is not an option.
I am currently using NDepend with the query from this answer NDepend CQL Query for missing IDisposable implementation but that is not what I need. I need to know if an object is instantiated and later on not being disposed of. How to write a query in NDepend that will find those objects? Or if that is not possible then how to get a list of places where IDisposable objects are being instantiated?