ICorDebugProcess5::EnumerateGCReferences Method

Gets an enumerator for all objects that are to be garbage-collected in a process.

Syntax

HRESULT EnumerateGCReferences(  
    [in] Bool enumerateWeakReferences,
    [out] ICorDebugGCReferenceEnum **ppEnum  
);  

Parameters

enumerateWeakReferences
[in] A Boolean value that indicates whether weak references are also to be enumerated. If enumerateWeakReferences is true, the ppEnum enumerator includes both strong references and weak references. If enumerateWeakReferences is false, the enumerator includes only strong references.

ppEnum
[out] A pointer to the address of an ICorDebugGCReferenceEnum that is an enumerator for the objects to be garbage-collected.

Remarks

This method provides a way to determine the full rooting chain for any managed object in a process and can be used to determine why an object is still alive.

Requirements

Platforms: See System Requirements.

Header: CorDebug.idl, CorDebug.h

Library: CorGuids.lib

.NET Framework Versions: Available since 4.5

See also