Skip to content
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

manually release ITypeInfo references (missed one) #3321

Merged
merged 2 commits into from
May 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Licensed to the .NET Foundation under one or more agreements.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

Expand Down Expand Up @@ -43,6 +43,7 @@ public unsafe void IDispatch_GetTypeInfo_Invoke_Success()
HRESULT hr = dispatch.GetTypeInfo(0, Kernel32.GetThreadLocale(), out typeInfo);
Assert.Equal(HRESULT.S_OK, hr);
Assert.NotNull(typeInfo);
System.Runtime.InteropServices.Marshal.ReleaseComObject(typeInfo);
}
RussKie marked this conversation as resolved.
Show resolved Hide resolved

[WinFormsFact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ public unsafe void ITypeInfo_GetRefTypeInfo_Invoke_Success()

ITypeInfo refTypeInfo;
hr = typeInfo.GetRefTypeInfo(refType, out refTypeInfo);
using var refTypeInfoReleaser = new ComRefReleaser(refTypeInfo);
Assert.Equal(HRESULT.S_OK, hr);
Assert.NotNull(refTypeInfo);
}
Expand Down