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

Switch to Finalizer #691

Merged
merged 7 commits into from
May 7, 2023
Merged

Switch to Finalizer #691

merged 7 commits into from
May 7, 2023

Conversation

halildurmus
Copy link
Owner

@halildurmus halildurmus commented May 6, 2023

  • Switches to Finalizer in IUnknown to call .release() automatically when objects go out of scope
  • Removes Unloading COM support section in doc/com.md
    I'm worried that in some cases, if .release() is called (by Finalizer) after COM is unloaded due to call to CoUninitialize, it'll lead to use after free that causes the process to crash, so I think it's better to let COM torn down when the process is terminated (we did something similar for WinRT and removed the mention of winrtUninitialize which was calling RoUninitialize Support automatic initialization of the WinRT and remove winrtUnitialize helper function #642)
  • Updates examples and tests accordingly

@halildurmus halildurmus marked this pull request as ready for review May 7, 2023 11:50
@halildurmus halildurmus requested a review from timsneath May 7, 2023 11:50
Copy link
Contributor

@timsneath timsneath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks!

@timsneath timsneath merged commit 3177e32 into main May 7, 2023
@timsneath timsneath deleted the finalizer branch May 7, 2023 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants