register
Registers an object with the registry.
Parameters
target
The target object to register.
heldValue
The value to pass to the finalizer for this object. This cannot be the target object.
unregisterToken
The token to pass to the unregister method to unregister the target object. If provided (and not undefined), this must be an object. If not provided, the target cannot be unregistered.