-
Notifications
You must be signed in to change notification settings - Fork 6k
Fixes Semantic Object memory leak cause of wrong release call #18107
Conversation
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 doesn't fix anything, it just converts a manual release to an autorelease pool release. Please file an issue with the problem you are trying to fix. Thanks!
SemanticsObject* delegateObject = [[FlutterSemanticsObject alloc] initWithBridge:weak_ptr | ||
uid:node.id]; | ||
SemanticsObject* delegateObject = | ||
[[[FlutterSemanticsObject alloc] initWithBridge:weak_ptr uid:node.id] autorelease]; | ||
return (SemanticsObject*)[[[FlutterSwitchSemanticsObject alloc] | ||
initWithSemanticsObject:delegateObject] autorelease]; |
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.
@gaaclarke Here return directly, release statement would not execute.
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.
@gaaclarke Hey, can you review this again? 🍻
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.
Thanks @zhongwuzw looks good, can you spend a minute looking to see if you can make a test for this?
I poked around and didn't see an easy way to test beyond looking at retain counts. It's not a huge deal. I just want to find every opportunity to try to build up tests in this code. Thanks @zhongwuzw . |
No description provided.