ICorProfilerCallback::ObjectsAllocatedByClass Method

Notifies the profiler about the number of instances of each specified class that have been created since the most recent garbage collection.

HRESULT ObjectsAllocatedByClass(
    [in]                       ULONG   cClassCount,
    [in, size_is(cClassCount)] ClassID classIds[] ,
    [in, size_is(cClassCount)] ULONG   cObjects[] );


Parameter Description


[in] The size of the classIds and cObjects arrays.


[in] An array of class IDs, where each ID specifies a class with one or more instances.


[in] An array of integers, where each integer specifies the number of instances for the corresponding class in the classIds array.

The classIds and cObjects arrays are parallel arrays. For example, classIds[i] and cObjects[i] reference the same class. If no instance of a class has been created since the previous garbage collection, the class is omitted. The ObjectsAllocatedByClass callback will not report objects allocated in the large object heap.

The numbers reported by ObjectsAllocatedByClass are only estimates. For exact counts, use ICorProfilerCallback::ObjectAllocated Method.

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

Header: CorProf.idl

Library: CorGuids.lib

.NET Framework Version: 2.0