-
-
Notifications
You must be signed in to change notification settings - Fork 291
Removed WindowsForms dependency for NativeAOT #802
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
Conversation
…time registrations out of Integration.NativeAOT.
Implemented NativeWindow using Win32 API
Implemented minimal LogDisplay using Win32 API, removed WindowsForms dependency
Added a RibbonController to ExcelDna.TestAOT project.
Implemented support for custom ribbon images using Win32 API
|
||
// Marshal to .NET, then call .Application | ||
object obj = ComInterop.Util.TypeAdapter.GetObject(pUnk); | ||
Marshal.Release(pUnk); |
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.
Why can we skip the Release here? It seems we end up calling Marshal.GetObjectForIUnknown which increments the reference count.
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.
As I understand,
The reference count will be decremented when the runtime performs garbage collection on the managed object that represents the COM object.
In our case it will be decremented on line 510
finally
{
ComInterop.Util.TypeAdapter.ReleaseObject(obj);
}
Calling Marshal.Release(pUnk) manually will over decrement the reference count.
No description provided.