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-10227: Kitchensink: Kitchensink crashes on relaunch after opening ... #2657

Merged
merged 1 commit into from
Aug 6, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,18 @@ protected void onDestroy()
finish();
return;
}

//Remove activityWindows reference from tabs. ActivityWindow reference is only removed when a tab is created (but is added when a tab is added to a tabGroup).
//Furthermore, when a tabGroup opens, only the current tab is created (the rest won't create until clicked on). This introduces a memory leak when we have multiple tabs,
//and attempt to open/close tabGroup without navigating through all the tabs.
TabProxy[] tabs = proxy.getTabs();
for (int i = 0; i < tabs.length; ++i) {
TiActivityWindows.removeWindow(tabs[i].getWindowId());
}


if (proxy != null) {
//Remove activityWindows reference from tabs. ActivityWindow reference is only removed when a tab is created (but is added when a tab is added to a tabGroup).
//Furthermore, when a tabGroup opens, only the current tab is created (the rest won't create until clicked on). This introduces a memory leak when we have multiple tabs,
//and attempt to open/close tabGroup without navigating through all the tabs.
TabProxy[] tabs = proxy.getTabs();
if (tabs != null) {
for (int i = 0; i < tabs.length; ++i) {
TiActivityWindows.removeWindow(tabs[i].getWindowId());
}
}

proxy.closeFromActivity();
proxy = null;
}
Expand Down