SPDisposeCheck is a tool that helps developers and administrators check custom SharePoint solutions that use the SharePoint Object Model helping measure against known Microsoft dispose best practices. This tool may not show all memory leaks in your code and may produce false positives which need further review by subject matter experts.[1]
-
Install SharePoint Dispose tracker tool.
Make sure you have installed Microsoft visual Studio 2010. Then run installer file SPDisposeCheck.exe.