nerdexam
Microsoft

70-573 · Question #227

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

Sign in or unlock 70-573 to reveal the answer and full explanation for question #227. 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.) 01Dim recWeb As SPWeb = properties.Web 03 Using web As SPWeb = siteCollection.OpenWeb() 04 Dim oWeb As PublishingWeb = PublishingWeb.GetPublishingWeb(web) 05 Dim pubWebs As PublishingWebCollection = oWeb.GetPublishingWebs() 06 For Each iWeb As PublishingWeb In pubWebs 07 Try 08 Dim page As SPFile = web.GetFile("/Pages/default.aspx") 09 Dim wpManager As SPLimitedWebPartManager = page.GetLimitedWebPartManager(PersonalizationScope.[Shared]) 10 Finally 11 If iWeb IsNot Nothing Then 12 iWeb.Close() 13 End If 14 End Try 15 Next 16 End Using 17 End Using You need to prevent the event receiver from causing memory leaks. Which object should you dispose of?

Options

  • AoWeb at line 04
  • BrecWeb at line 01
  • CwpManager at line 09
  • DwpManager.Web at line 09

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
You create an event receiver. The ItemAdded method for the event... | 70-573 Q#227 Answer | NerdExam