Microsoft SDK for Java

IJavaEventMonitorIDInfo2::
GetHandlesToObjects

The GetHandlesToObjects method of the IJavaEventMonitorIDInfo2 interface is called by a profiler or heap monitoring program to obtain an array of persistent handles to objects that are valid across garbage collections and can be converted to ObjectIDs to allow tracking of specific objects. The debugger or profiler must pass an array of ObjectIDs for which it wants to obtain persistent handles.

The GetHnadlesToObjects method is implemented only by the IJavaEventMonitorIDInfo2 and IJavaEventMonitorIDInfo3 interfaces.

Syntax

HRESULT GetHandlesToObjects(unsigned nobjects, ObjectID *pobject_ids, ObjectHandleID *pobject_handles);

Return Value

An array of persistent handles for ObjectIDs.

Parameters

[in] nobjects The number of ObjectIDs in the array.
[in] *pobject_ids The array of ObjectIDs for which persistent handles are requested.
[in, out] *pobject_handles The array to receive the persistent handles (ObjectHandleIDs).

Remarks

Note that owning a handle to an object will not prevent the object from being garbage-collected.

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