Dispose refers to the cleaning up of resources used by an object during its lifetime. The .NET Framework is a garbage-collected runtime, which means this happens automatically, however SharePoint has a habit of maintaining its unmanaged resources, which may result in high memory usage if disposal is ...

learn more… | top users | synonyms

0
votes
3answers
699 views

SPSite and SPWeb object dispose inside foreach loop

I have a code that loops through all the Sites and Webs in a web application. My code uses for..each loop to navigate through each site and web object. I was wondering if we are required to dispose ...
2
votes
2answers
341 views

Dispose in Client Object Model

Should objects be disposed when using the client object model? If so, which ones? There seems to be plenty of information on this for server side, but nothing from Microsoft specifically about ...
4
votes
5answers
3k views

Disposal of SPWebs created using SPSite.OpenWeb()

After reading some answers/comments on Disposal of SPWebs retrieved from SPContext.Current.Site.AllWebs, I opened up Reflector to dig deeper into the SPSite and SPWeb classes. I ran into a surprise, ...
2
votes
2answers
2k views

Warning of undisposed objects in Microsoft's own SharePoint code

I found many 8l1n warnings of undisposed objects in the SharePoint ULS logs. The interesting thing is that the entire stack trace does not show anything in my code. I am not sure what to look for in ...
6
votes
3answers
3k views

Disposal of SPWebs retrieved from SPContext.Current.Site.AllWebs

As there was a minor disagreement on whether SPWebs retrieved from SPContext.Current.Site.AllWebs should be disposed, I thought it would be appropriate to post a new question and discuss it here. I ...
11
votes
1answer
474 views

Memory leak in Microsoft.Sharepoint.Taxonomy.TaxonomyItemEventReceivers?

I've been trying to locate some memory leaks we've noticed in our ULS (EventID: nask, An SPRequest object was not disposed ... etc). On my dev environment, and at least 2 other cleaner installs, the ...
4
votes
3answers
378 views

An SPRequest object was not disposed - determine where this object was allocated

I have the SPRequest object was not disposed error. 12/10/2013 14:21:03.03 w3wp.exe (0x260C) 0x1700 SharePoint Foundation Performance nask ...
0
votes
1answer
297 views

Dispose SPWeb object in recursive function

I have updated my code as per suggestions from suggestions on my earlier question , I still see the error message for one of my recursive function. Below is the code snippet to recursively loop ...