ICorProfilerCallback::ObjectAllocated Method
Notifies the profiler that memory within the heap has been allocated for an object.
Syntax
HRESULT ObjectAllocated(
[in] ObjectID objectId,
[in] ClassID classId);
Parameters
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.
Remarks
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.
Requirements
Platforms: See System Requirements.
Header: CorProf.idl, CorProf.h
Library: CorGuids.lib
.NET Framework Versions: Available since 2.0
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho