Instructs the garbage collector not to call the object.Finalize method on the specified object.
- obj
- The object whose object.Finalize method will not be called.
Type Reason ArgumentNullException obj is a null reference. InvalidOperationException The caller of this method is not the same as the object passed to this method.
The method removes obj from the set of objects that require finalization. obj is required to be the caller of this method.
Note: Objects that implement the IDisposable interface should 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.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0