Questions tagged [dispose]

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 not performed manually.

0
votes
2answers
91 views

Dispose SPWeb error

I need an advice on sharepoint logs related to disposing objects. I was looking in the logs and found these : Unexpected Detected use of SPRequest for previously closed SPWeb object. Please close ...
20
votes
1answer
1k 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 ...
0
votes
1answer
46 views

DocumentSet.Import and Detected use of SPRequest for previously closed SPWeb object

I've written a code to move DocumentSets from one list to another list and I'm talking about a lot of DocumentSets. And this has to happen in every Web and in every Site. I've written the following ...
0
votes
1answer
18 views

Getting SPWeb object disposal

I have following code like below: SPWeb web = SPContext.Current.Web; VariationLabel label = GetCurrentVariationLabel(web); return label; Can this cause memory leak?How would I dispose this web?...
0
votes
1answer
523 views

Do I need to dispose a SPWeb or SPSite object from a WorkflowContext

I'm working on a Custom Workflow activity. In the activity I use the WorkflowContext-object. From this object I get the current SPSite or SPWeb via the Site and Web properties of the WorkflowContext. ...
0
votes
0answers
83 views

Event Reciever Object Disposal Issues

I am getting this error after adding a document to a library that has a custom event receiver associated with it: An SPRequest object was not disposed before the end of this thread. To avoid ...