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
[TIMOB-10891] Tabgroup leaks memory #3203
Conversation
…e into timob-10891
…e into timob-10891
@@ -30,7 +29,7 @@ -(id)initWithProxy:(TiWindowProxy*)window_ tab:(TiUITabProxy*)tab_ | |||
{ | |||
if (self = [self initWithViewProxy:window_]) | |||
{ | |||
tab = [tab_ retain]; | |||
tab = tab_; |
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.
please add a comment to .h file that tab is now assign(non-retain) ivar.
Added comments to header files. Ready for review. |
[self closeWindow:[current window] animated:YES removeTab:YES]; | ||
[controller setDelegate:nil]; | ||
if ([[controller viewControllers] count] > 1) { | ||
NSMutableArray* doomedVcs = [[NSMutableArray arrayWithArray:[controller viewControllers]] retain]; |
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.
Not critical, but the returned array is already autoreleased, so no retain/release is required for doomedVcs
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.
Specifically retained it in case the autorelease pool gets drained due to GC which might be problematic.
Code reviewed. Tentatively approved |
FT: crash with TIMOB-7152 |
Core reviewed. APPROVED |
FT PASSED |
[TIMOB-10891] Tabgroup leaks memory
Test is in JIRA
Be sure to test code in comments
Regress against
TIMOB-7858
TIMOB-7714
TIMOB-7644
TIMOB-7152
TIMOB-7791
TIMOB-7820
KS smoke test