Expand Minimize

ICorProfilerCallback::ObjectAllocated Method

Notifies the profiler that memory within the heap has been allocated for an object.

HRESULT ObjectAllocated(
    [in] ObjectID objectId,
    [in] ClassID classId);

objectId

[in] The ID of the object for which memory was allocated.

classId

[in] The ID of the class of which the object is an instance.

The ObjectedAllocated method is not called for allocations from either the stack or unmanaged memory. The classId parameter can refer to a class in managed code that has not been loaded yet. The profiler will receive a class load callback for that class immediately after the ObjectAllocated callback.

Platforms: See .NET Framework System Requirements.

Header: CorProf.idl, CorProf.h

Library: CorGuids.lib

.NET Framework Versions: 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft