Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a webpart that loops through web apps, sites, and webs. I using the DoesUserHavePermissions() to check whether or not the user has access to the site. I'm getting an error on this line. I've made sure to dispose of any SPWebs, and SPSites.

Is there a tool that I can use to check where the memory leak is happening?

Thanks,

share|improve this question

3 Answers

up vote 0 down vote accepted

Have you tried MS SharePoint disposal checker tool? http://archive.msdn.microsoft.com/SPDisposeCheck

share|improve this answer

Hope this help you out

In this article describes the best practices as well SharePoint dispose checker tool.

http://angler.wordpress.com/2011/06/20/detecting-memory-leaks-in-sharepoint-2010/

share|improve this answer

If you leak SPRequests (SPSite/SPWeb) in a Web Part then it'll listed in the ULS log (Use ULSviewer) to see that.

You can get more information about where the leak occured by setting CollectSPRequestAllocationCallStacks of the ContentService to true see SPRequest allocation callstack logging in SharePoint 2010 and WSS 4.0

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.