GC.ReRegisterForFinalize Method (Object)
Requests that the system call the finalizer for the specified object for which SuppressFinalize has previously been called.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- obj
-
Type:
System.Object
The object that a finalizer must be called for.
| Exception | Condition |
|---|---|
| ArgumentNullException | obj is null. |
The ReRegisterForFinalize method adds the obj parameter to the list of objects that request finalization before the garbage collector frees the object. The obj parameter must be the caller of this method.
Calling the ReRegisterForFinalize method does not guarantee that the garbage collector will call an object's finalizer.
By default, all objects that implement finalizers are added to the list of objects that require finalization; however, an object might have already been finalized or might have disabled finalization by calling the SuppressFinalize method.
A finalizer can use this method to resurrect itself or an object that it references.
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1