The GetObjectsFromHandles method of the IJavaEventMonitorIDInfo2 interface is called by a profiler or heap monitoring program to obtain an array of ObjectIDs from an array of persistent handles retrieved previously by calling GetHandlesToObjects. The debugger or profiler must pass an array of persistent handles for which it wants to obtain the current ObjectIDs.
The GetObjectsFromHandles method is implemented only by the IJavaEventMonitorIDInfo2 and IJavaEventMonitorIDInfo3 interfaces.
HRESULT GetObjectsFromHandles(unsigned nhandles, ObjectHandleID *pobject_handles, ObjectID *pobject_ids);
An equivalent array of object IDs.
[in] nhandles | The number of handles (ObjectHandleIDs) in the array. |
[in, out] *pobject_handles | The array of persistent handles for which ObjectIDs are requested. |
[in, out] *pobject_ids | The array to receive the ObjectIDs. |
ObjectIDs are only valid between garbage-collections; consequently, persistent handles can be used for long-term tracking of objects in memory.
If an object referenced by a handle has been garbage-collected, the ObjectID in pobject_ids will be NULL and the corresponding ObjectHandleID will be automatically freed and set to NULL in pobject_handles.