nerdexam
Microsoft

70-576 · Question #102

You are designing a Windows application that accesses information stored on a SharePoint 2010 intranet site. The application displays employee information in a data grid sourced from a list on the…

The correct answer is B. Implement the class with the IDisposable interface and explicitly dispose of the SharePoint. See the full explanation below for the reasoning.

Question

You are designing a Windows application that accesses information stored on a SharePoint 2010 intranet site. The application displays employee information in a data grid sourced from a list on the Human Resources site. To filter and manipulate the employee details list, the design includes a class to cache the data that is accessed. The class keeps the SPWeb object open, but only retrieves data that is not already cached. You need to ensure proper memory utilization and resource management for the application. Which approach should you recommend?

Options

  • AImplement the class with the IDisposable interface and allow the .NET Framework garbage
  • BImplement the class with the IDisposable interface and explicitly dispose of the SharePoint
  • CImplement the class as a fully managed .Net Framework object and allow the .NET
  • DImplement the class as a fully managed .Net Framework object and explicitly manage the

How the community answered

(64 responses)
  • A
    17% (11)
  • B
    72% (46)
  • C
    3% (2)
  • D
    8% (5)

Community Discussion

No community discussion yet for this question.

Full 70-576 Practice