Microsoft SDK for Java

IJavaEventMonitorIDInfo2::
GetObjectsFromHandles

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.

Syntax

HRESULT GetObjectsFromHandles(unsigned nhandles, ObjectHandleID *pobject_handles, ObjectID *pobject_ids);

Return Value

An equivalent array of object IDs.

Parameters

[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.

Remarks

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.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.