Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 是否必须处置以下SharePoint对象?_C#_Sharepoint_Sharepoint 2010 - Fatal编程技术网

C# 是否必须处置以下SharePoint对象?

C# 是否必须处置以下SharePoint对象?,c#,sharepoint,sharepoint-2010,C#,Sharepoint,Sharepoint 2010,我想确保SharePoint中没有内存泄漏,所以完成后是否需要为以下SharePoint对象调用dispose?我想我不应该这么做,因为我没有创建新的和使用GetCurrent,但是使用SharePoint很难说 Microsoft.SharePoint.WebControls.SiteActions siteActions = SiteActions.GetCurrent(this.Page); Microsoft.SharePoint.WebControls.PageStateA

我想确保SharePoint中没有内存泄漏,所以完成后是否需要为以下SharePoint对象调用dispose?我想我不应该这么做,因为我没有创建新的和使用GetCurrent,但是使用SharePoint很难说

Microsoft.SharePoint.WebControls.SiteActions siteActions 
    = SiteActions.GetCurrent(this.Page);

Microsoft.SharePoint.WebControls.PageStateActionButton psab 
    = PageStateActionButton.GetCurrent(this.Page);

Microsoft.SharePoint.WebControls.SPRibbon ribbon 
    = Microsoft.SharePoint.WebControls.SPRibbon.GetCurrent(this.Page);