SuppressFinalize Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Requests that the system not call the finalizer for the specified object.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

'Declaration
Public Shared Sub SuppressFinalize ( _
	obj As Object _
)

Parameters

obj
Type: System..::..Object
The object that a finalizer must not be called for.

ExceptionCondition
ArgumentNullException

obj is nullNothingnullptrunita null reference (Nothing in Visual Basic).

This method sets a bit in the object header, which the system checks when calling finalizers. The obj parameter is required to be the caller of this method.

Objects that implement the IDisposable interface can call this method from the IDisposable..::..Dispose method to prevent the garbage collector from calling Object..::..Finalize on an object that does not require it.

Show: