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-12286: Android: Memory leak when backing out and coming back to an app #3757

Merged
merged 5 commits into from Jan 29, 2013

Conversation

ayeung
Copy link
Contributor

@ayeung ayeung commented Jan 23, 2013

https://jira.appcelerator.org/browse/TIMOB-12286

This pull request makes it so we no longer wrap our global context inside a persistent handle. This would cause a memory leak since it would never get cleaned up. Modules also no longer create a new context when they are created. Instead, they use the existing context and TiInclude was also changed to do the same.

Please run test case in TIMOB-12286, TIMOB-11752, and also do a pass of KS.

@@ -107,7 +107,7 @@ class NativeObject
assert(value == obj->handle_);
assert(!obj->refs_);
assert(value.IsNearDeath());
delete obj;
// delete obj;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like leaving this delete commented out. I recall it was causing a crash, but we should figure out the cause and fix it properly.

@pingwang2011
Copy link
Contributor

Functionally tested. Ran test cases in TIMOB-12286 and TIMOB-11752 and also ran KS as a sanity test. All passed. FR Accepted

@pingwang2011
Copy link
Contributor

Josh has already reviewed the code and accepted the request.
Merging it.

pingwang2011 added a commit that referenced this pull request Jan 29, 2013
TIMOB-12286: Android: Memory leak when backing out and coming back to an app
@pingwang2011 pingwang2011 merged commit eee73fb into tidev:master Jan 29, 2013
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

3 participants