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

时间:2015-04-22 17:52:12

标签: c# sharepoint sharepoint-2010

我想确保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);

0 个答案:

没有答案