SPWeb.Close 方法
Closes the website at the end of a request and releases resources.
命名空间: Microsoft.SharePoint
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Sub Close
用法
Dim instance As SPWeb
instance.Close()
public void Close()
备注
Uses this method to release the resources of the SPWeb object when you are finished using the object. Do not reuse the object or objects that are obtained through the object after it is closed.
If you create an SPWeb object, use this method to close the object. However, if you have a reference to a shared resource, such as when the object is provided by the GetContextWeb method, do not use this method to close the object, but instead allow SharePoint Foundation or your portal application to manage the object. For more information about good coding practices, see Disposing Objects.