Advanced C#
Q93 / 100

What is the Dispose Pattern and GC.SuppressFinalize interaction?

Correct! Well done.

Incorrect.

The correct answer is B) GC.SuppressFinalize(this) in Dispose() removes the object from the finalization queue so the GC doesn't spend extra time re-visiting it

B

Correct Answer

GC.SuppressFinalize(this) in Dispose() removes the object from the finalization queue so the GC doesn't spend extra time re-visiting it

Explanation

Adding a finalizer puts the object on the finalization queue (extra GC cycle). GC.SuppressFinalize() after explicit Dispose() avoids this overhead.

Progress
93/100