Connect.Collaborate.SharePoint

Attention all SharePoint Developers

I normally only blog my own thoughts and leave links to other information on my web site but this one is a critical resource to anyone who develops with the SharePoint object model. Although this is a WSS v3 beta document it relates to the current version also.

Several of the Windows SharePoint Services objects, primarily the SPSite class and SPWeb class objects, are created as managed objects. However, these objects use unmanaged code and memory to perform the majority of their work. The managed part of the object is small; the unmanaged part of the object is much larger. Because the smaller managed part of the object does not put memory pressure on the garbage collector, the garbage collector does not release the object from memory in a timely manner.
 
The object's use of a large amount of unmanaged memory can cause some of the unusual behaviors described earlier. Calling applications that work with IDisposable objects in Windows SharePoint Services must dispose of the objects when the applications finish using them. You should not rely on the garbage collector to release them from memory automatically.

You can use any of several techniques to ensure that the objects are disposed of properly. We discuss them in the following sections.
http://msdn2.microsoft.com/en-us/ms778813(office.12).aspx.
Posted by Ian Morrish on Saturday, 17 Jun 2006 09:31 | 0 Comments

Links to this post

Trackback from Blog on 12 Apr 2008 08:58

Name

Url

Email

Comments

CAPTCHA Image Validation