Home
You may like this!
46.
Which of the following statements about garbage collection is false?
  • A.
    In general, you can’t tell when the GC will perform garbage collection.
  • B.
    It is possible for a program to run without ever performing garbage collection.
  • C.
    An object’s Dispose method can call GC.SuppressFinalize to prevent the GC from calling the object’s destructor.
  • D.
    Before destroying an object, the GC calls its Dispose method.
  • Answer & Explanation
  • Report
Answer : [D]
Explanation :
Report
Name Email  
47.
Which of the following statements about destructors is false?
  • A.
    Destructors are called automatically.
  • B.
    Destructors cannot assume that other managed objects exist while they are executing.
  • C.
    Destructors are inherited.
  • D.
    Destructors cannot be overloaded.
  • Answer & Explanation
  • Report
Answer : [C]
Explanation :
Report
Name Email  
48.
If a class implements IDisposable , its Dispose method should do which of the following?
  • A.
    Free managed resources.
  • B.
    Free unmanaged resources.
  • C.
    Call GC.SuppressFinalize .
  • D.
    All of the above.
  • Answer & Explanation
  • Report
Answer : [D]
Explanation :
Report
Name Email  
49.
If a class has managed resources and no unmanaged resources, it should do which of the following?
  • A.
    Implement IDisposable and provide a destructor.
  • B.
    Implement IDisposable and not provide a destructor.
  • C.
    Not implement IDisposable and provide a destructor.
  • D.
    Not implement IDisposable and not provide a destructor.
  • Answer & Explanation
  • Report
Answer : [B]
Explanation :
Report
Name Email  
50.
If a class has unmanaged resources and no managed resources, it should do which of the following?
  • A.
    Implement IDisposable and provide a destructor.
  • B.
    Implement IDisposable and not provide a destructor.
  • C.
    Not implement IDisposable and provide a destructor.
  • D.
    Not implement IDisposable and not provide a destructor.
  • Answer & Explanation
  • Report
Answer : [A]
Explanation :
A full irruption test provides the most risk for the enterprise. Options A, B, and C are other types of test scenarios
Report
Name Email