-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement ICorProfilerInfo13 to support object handle creation/destruction/access #71257
Conversation
Tagging subscribers to this area: @tommcdon Issue DetailsIn the context of #55888, 3 methods are added to ICorProfilerInfo to manage strong, weak and pinned handles. The first usage will be to wrap the reference provided by AllocationTick_V4 by a weak reference handle and use them to figure out if the object is still alive after a certain amount of time. This should help building automatic memory leak detection system.
|
75571c0
to
2a38e20
Compare
@chrisnas if closing it was by accident, you should be able to reopen it. I can't for some reason |
git error... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few small changes, otherwise looks good to me!
break; | ||
|
||
default: | ||
handle = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should return E_INVALIDARG in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Good point. I'm also setting *pHandle to NULL
@chrisnas I think this is ready to merge, when are you planning on doing the docs on docs.microsoft.com? I would really prefer to wait for a docs PR before merging, otherwise docs tend to never get done. |
@davmason : is there anything else to do beyond dotnet/docs#30131? |
Nope, just missed that PR. Thanks, I'll merge this now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
In the context of #49424, 3 methods are added to ICorProfilerInfo to manage strong, weak and pinned handles.
The first usage will be to wrap the reference provided by AllocationTick_V4 by a weak reference handle and use them to figure out if the object is still alive after a certain amount of time. This should help building automatic memory leak detection system.
Note: the corresponding documentation is made available via dotnet/docs#30131