Questions

  1. A garbage collector can reclaim memory for unmanaged resources used in C# code.
    1. True
    2. False
  2. Which of the following can be used to make sure the Finalize method is not called?
    1. GC.Collect();
    2. GC.SupressFinalize(this);
    3. GC.WaitForPendingFinalizers();
    4. None of these

                3. Which one of the following statements is incorrect?

    1. Finalize can lead to performance implications due to the object remaining in memory longer than required.
    2. Generation 0 is used to save objects that are short-lived.
    3. Even if we use the IDisposable interface, we will not be able to suppress the calls that the garbage collector performs to execute the code in the Finalize method.
    4. The using block ensures that the Dispose method is called by the garbage collector automatically.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.146.221.149