-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
iOS A11y memory leak #7244
iOS A11y memory leak #7244
Conversation
/cc @jason-simmons since you recently touched this as well |
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.
Looks good to me, but can you have one of the ObjC experts take a look at well, e.g. @cbracken?
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.
Semantics objects can be accessed from both the platform and UI threads. On the other hand all fml::WeakPtr managed objects must be created, used and destroyed on one thread. "Use" of the object includes the get()
call. This makes the current usage of WeakPtr's thread unsafe.
I suggest using the std::weak_ptr
instead.
Otherwise, lgtm (though I still have to convince myself of this in a debugger).
9248f90
to
4ea610d
Compare
@@ -123,8 +126,7 @@ - (void)dealloc { | |||
[_children removeAllObjects]; | |||
[_children release]; | |||
_parent = nil; | |||
[_container release]; | |||
_container = nil; | |||
_container.get().semanticsObject = nil; |
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.
this really worked? maybe better:
_container.release();
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.
I can't remember the details now, but this was part of breaking the circular references.
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.
I can't remember the details now, but this was part of breaking the circular references.
This has been split out from #6879
The current implementation of the Accessibility Bridge on iOS leads to retain cycles. This patch can be applied independently of the othe retain cycle related work, and hopefully makes this easier to review/track.