Saturday, 31 October 2009

SPDisposeCheck Error workaround

I use the very useful SPDisposeCheck tool to check my assemblies using the SharePoint API to make sure i have not left any SharePoint objects open which could cause potential memory leaks.
I encounter issues using the output to xml file “–xml” switch on the tool where it simply crashes at the point of “Processing Method Traces”.  I am not sure if there is an updated version out there to fix this but should you want to get the output to a file rather than the command window, i use a workaround to which outputs (pipes) the command window to a file by using the > command, so your command should look something like this.
SPDisposeCheck “<mydllFileOrDirectory>” –debug  >”<outputdirectory>outputtfile.txt”
Hope that helps if people want to save the output.

0 comments:

Post a Comment