Microsoft SDK for Java

GCNewHandle

Creates a strong pointer to an object.

Syntax

HObject** __cdecl GCNewHandle(HObject *phobj);

Return Value

Returns an address to the object pointer.

Parameters

*phobj The object that is to be referenced.

Remarks

Using this function is similar to placing an object in a GCFrame; however, strong pointers can be stored statically across calls. A strong pointer prevents the object from being collected as garbage, whereas a weak pointer only tracks the object's movement.

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