Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

User/ocalvo/fix lifetime bug#103

Merged
ocalvo merged 9 commits into6.0.0from
user/ocalvo/FixLifetimeBug
Apr 9, 2019
Merged

User/ocalvo/fix lifetime bug#103
ocalvo merged 9 commits into6.0.0from
user/ocalvo/FixLifetimeBug

Conversation

@ocalvo
Copy link
Contributor

@ocalvo ocalvo commented Apr 9, 2019

Issue: #

Workaround Bug 19653836: Remove code that sets the CoreWindow as a child of the first top-level HWND, and other cruft from the DWXS CCI implementation

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

When a secondary window is closed in a multi window app that it itself created the first WindowsXamlHost instance, and if the instance of the xaml hosting element is not disposed, then Xaml will be left in a bad state using a dangling HWND pointer.
When a new Window is created after this, some Xaml elements will not render correctly anymore.

What is the new behavior?

To workaround this issue, we are calling Dispose in response to the parent handle of getting destroyed.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

@azchohfi azchohfi changed the base branch from master to 6.0.0 April 9, 2019 20:51
@ocalvo ocalvo merged commit 355d01e into 6.0.0 Apr 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the user/ocalvo/FixLifetimeBug branch April 9, 2019 21:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants