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

fix memory leak #14172

Closed
wants to merge 1 commit into from
Closed

fix memory leak #14172

wants to merge 1 commit into from

Conversation

yk3372
Copy link
Contributor

@yk3372 yk3372 commented May 25, 2017

Signed-off-by: yk3372 [email protected]

Motivation (required)

What existing problem does the pull request solve?

ViewManagersPropertyCache, ViewManagerPropertyUpdater static field not release when ReactInstanceManager called destroy.

Test Plan (required)

I use this url to integrate RN:
http://facebook.github.io/react-native/docs/integration-with-existing-apps.html
and in Activity's onDestroy function add the follow code to release RN:

mReactInstanceManager.destroy();
mReactInstanceManager = null;

and then when I exit activity, find the static field not release.
the follow is screen shot:
before:
2017-05-23 17 41 16
after:
2017-05-23 17 38 49

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. GH Review: review-needed labels May 25, 2017
@yk3372
Copy link
Contributor Author

yk3372 commented May 25, 2017

@javache I has made some change, and has made the test run success. Thanks

#14145

@facebook-github-bot facebook-github-bot added GH Review: accepted Import Started This pull request has been imported. This does not imply the PR has been approved. and removed GH Review: review-needed labels May 25, 2017
@facebook-github-bot
Copy link
Contributor

@javache has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Signed-off-by: yk3372 <[email protected]>
chnfeeeeeef pushed a commit to chnfeeeeeef/react-native that referenced this pull request May 31, 2017
Summary:
Signed-off-by: yk3372 <[email protected]>

What existing problem does the pull request solve?

ViewManagersPropertyCache, ViewManagerPropertyUpdater static field not release when ReactInstanceManager called destroy.

I use this url to integrate RN:
[http://facebook.github.io/react-native/docs/integration-with-existing-apps.html](http://facebook.github.io/react-native/docs/integration-with-existing-apps.html)
and in Activity's onDestroy function add the follow code to release RN:
```java
mReactInstanceManager.destroy();
mReactInstanceManager = null;
```
and then when I exit activity, find the static field not release.
the follow is screen shot:
before:
![2017-05-23 17 41 16](https://cloud.githubusercontent.com/assets/1514899/26350318/53ea250c-3fe5-11e7-8eda-a0dcc20ba4f6.jpg)
after:
![2017-05-23 17 38 49](https://cloud.githubusercontent.com/assets/1514899/26350329/5e5b273e-3fe5-11e7-9b0b-a8b0e044abf3.jpg)
Closes facebook#14172

Differential Revision: D5128834

Pulled By: javache

fbshipit-source-id: 657763fa21fd8826b4060f9a17e7f35f0e1e04d3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Import Started This pull request has been imported. This does not imply the PR has been approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants