Garbage-collection safe method for updating the fields in an object.
void __cdecl GCSetObjectReferenceForObject(HObject **location, HObject *phobj);
**location | The pointer to a field of an object. |
*phobj | The new object pointer. |
The safest method to set a field in an object is to use the Field_SetValue method. If objects are not updated using a garbage-collection safe method, the Microsoft VM will fault during the next garbage collection.