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

Resolve remaining iOS widget memory leaks. #2853

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

freakboy3742
Copy link
Member

A follow up to #2850; this resolves the remaining widget memory leaks on iOS.

The underlying issue is one that has been previously solved on macOS, but the fix wasn't ported to iOS. Constraint objects are ObjC instances that are referenced by ObjC widgets; however, if the underlying widget is garbage collected before the constraint, the widget reference no longer exists, and so it can't be removed from the constraint. This causes a segfault when the constraint is disposed.

macOS added a fix for this some time ago; but the same fix wasn't applied to iOS. This ports the fix over to iOS, which then in turn allows the remaining iOS memory leaks to be resolved.

Refs #2849.

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

mhsmith
mhsmith previously approved these changes Sep 17, 2024
@mhsmith
Copy link
Member

mhsmith commented Sep 17, 2024

Unfortunately it's still crashing in or immediately after test_optioncontainer, and the rerun is the same.

@freakboy3742
Copy link
Member Author

Whelp... thought I had it. Back to the drawing board, I guess...

@freakboy3742 freakboy3742 marked this pull request as draft September 17, 2024 22:32
@freakboy3742 freakboy3742 removed the request for review from samschott September 17, 2024 22:32
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