The Wayback Machine - https://web.archive.org/web/20200914065521/http://github.com/microsoft/Win2D/issues/658
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

Win2D XAML controls leak (along with their parent/siblings) unless removed from their parent #658

Open
BryanFerguson opened this issue Nov 26, 2018 · 0 comments
Labels

Comments

@BryanFerguson
Copy link

@BryanFerguson BryanFerguson commented Nov 26, 2018

A small test app here demonstrates the leak.

The Win2D controls currently retain a strong reference to their parent element (m_lastSeenParent), causing a reference cycle that isn't broken unless they're removed from their parent after it's unloaded. The Avoiding memory leaks doc suggests that this removal is only necessary for a managed app/control that doesn't unsubscribe for events from a Win2D control. This isn't accurate: the parent reference retained in support of the RemoveFromVisualTree method introduces a cycle that may only be broken by calling this method or removing the control from its parent by other means.

@shawnhar shawnhar added the suggestion label Dec 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.