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

[TIMOB-10891] Tabgroup leaks memory #3203

Merged
merged 16 commits into from Oct 17, 2012
Merged

[TIMOB-10891] Tabgroup leaks memory #3203

merged 16 commits into from Oct 17, 2012

Conversation

vishalduggal
Copy link
Contributor

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

@ghost ghost assigned mstepanov Oct 14, 2012
@@ -30,7 +29,7 @@ -(id)initWithProxy:(TiWindowProxy*)window_ tab:(TiUITabProxy*)tab_
{
if (self = [self initWithViewProxy:window_])
{
tab = [tab_ retain];
tab = tab_;
Copy link
Contributor

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.

@vishalduggal
Copy link
Contributor Author

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];
Copy link
Contributor

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

Copy link
Contributor Author

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.

@mstepanov
Copy link
Contributor

Code reviewed. Tentatively approved

@mstepanov
Copy link
Contributor

FT: crash with TIMOB-7152

@mstepanov
Copy link
Contributor

Core reviewed. APPROVED

@mstepanov
Copy link
Contributor

FT PASSED

mstepanov pushed a commit that referenced this pull request Oct 17, 2012
[TIMOB-10891] Tabgroup leaks memory
@mstepanov mstepanov merged commit e122e5d into tidev:master Oct 17, 2012
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.

None yet

2 participants