Freigeben über


ICorProfilerInfo::ForceGC Method

Forces garbage collection to occur within the runtime.

HRESULT ForceGC();

Remarks

The ForceGC method must be called only from a thread that has never run managed code and does not have any profiler callbacks on its stack. The most convenient implementation is to create a separate thread within the profiler that calls ForceGC when signaled.

Requirements

Platforms: Windows 2000, Windows XP, Windows Server 2003 family

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0

See Also

Reference

ICorProfilerInfo Interface