nerdexam
Microsoft

70-573 · Question #256

70-573 Question #256: Real Exam Question with Answer & Explanation

Sign in or unlock 70-573 to reveal the answer and full explanation for question #256. The question stem and answer options stay visible for context.

Question

You create an event receiver. The ItemAdded method for the event receiver contains the following code segment. (Line numbers are included for reference only.) 01 SPWeb recWeb = properties.Web; 03 { 04 using (SPWeb web = siteCollection.OpenWeb()) 05 { 06 PublishingWeb oWeb = PublishingWeb.GetPublishingWeb(web); 07 PublishingWebCollection pubWebs = oWeb.GetPublishingWebs(); 08 foreach (PublishingWeb iWeb in pubWebs) 09 { 10 try 11 { 12 SPFile page = web.GetFile("/Pages/default.aspx"); 13 SPLimitedWebPartManager wpManager = page.GetLimitedWebPartManager (PersonalizationScope.Shared); 14 } 15 finally 16 { 17 if (iWeb != null) 18 { 19 iWeb.Close(); 20 } 21 } 22 } 23 } 24 } You need to prevent the event receiver from causing memory leaks. Which object should you dispose of?

Options

  • AoWeb at line 06
  • BrecWeb at line 01
  • CwpManager at line 13
  • DwpManager.Web at line 13

Unlock 70-573 to see the answer

You've previewed enough free 70-573 questions. Unlock 70-573 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-573 Practice