Conversation
|
Tagging subscribers to this area: @dotnet/area-system-directoryservices, @jay98014 Issue DetailsFix a case where we accidentally leaked a COM object reference in System.DirectoryServices.AccountManagement. I validated that there's no other cases where we missed a leak in the rest of the codebase. The rest of the cases where we use COM interop either didn't have this issue or get their COM object references through COM Activation, so they don't go through LibraryImport at all. Fixes #83269
|
| { | ||
| if (ppObjPtr != IntPtr.Zero) | ||
| { | ||
| Marshal.Release(ppObjPtr); |
There was a problem hiding this comment.
Is it possible to add a unit test for this?
There was a problem hiding this comment.
I don't know enough about this space to add a unit test and testing specifically if we leak a COM object here is difficult.
buyaa-n
left a comment
There was a problem hiding this comment.
LGTM, it would be great if we could add a unit test. Also, I believe we want to port it into 7.0
|
/backport to release/7.0-staging |
|
Started backporting to release/7.0-staging: https://github.com/dotnet/runtime/actions/runs/5729686954 |
Fix a case where we accidentally leaked a COM object reference in System.DirectoryServices.AccountManagement.
I validated that there's no other cases where we missed a leak in the rest of the codebase. The rest of the cases where we use COM interop either didn't have this issue or get their COM object references through COM Activation, so they don't go through LibraryImport at all.
Fixes #83269