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?


This questions addresses the issue I believe you're asking. The short of it being, if you're using the current context web, there is no need for disposal.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy