-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Memory leak when opening react native view controller in iOS #11961
Comments
Is this a regression in RN 0.40? What version did you upgrade from? |
I upgraded from RN 0.33. I just checked it with RN 0.39 and it doesn't occur. |
cc @javache |
any update on this? @janicduplessis @javache, don't want to put any pressure or anything but releasing v0.41 without fixing this issue does not make any sense! Since we have to wait another month for the next patch! |
I can see a leak related to bundle loading when running a debug instrumentation build in instruments. This shouldn't affect production builds since those use a bundle on disk. |
@javache what about the poor performance, I always get 25 to 30 frame per second! |
@alinz are you testing on a real device? It's really important that you profile speed/FPS on iPhone/iPad and not the simulator since it's often very different. |
@ide as you said, the fps on the actual device is 60. I should have tested all cases. 😞 |
Does 0.41 release includes a fix for this? As @alinz said, it's not feasible for me to use it otherwise. |
I am having the same issue using the master branch of the repo, reusing the same view controller and changing the appProperties fixed my problem, but it would be good if it could be freed :) Same as #11628 It doesn't add only a couple of Mb each time, my view usually takes 200Mb and everytime I was recreating it, 200Mb were added, so nothing from the context gets freed, probably just a strong reference but would anyone know where that would be? |
Similar issue from my side. With Android (testing on device), every time I hot refresh the memory piles up. Similarly, if I move to a different view on the app, the memory adds up. It never seems to be cleared. |
Can someone take a look at this? @emilsjolander, could you maybe ping someone that could know about this? :) Thank you! :) |
If @javache has already looked I don't know who to ping |
Oh sorry I didn't see @javache answer. If we are certain this doesn't affect release builds then fine with me. |
@julienfouilhe Nobody has verified and responded back yet, so probably a good thing to double-check (and let us know once you’ve done so). |
I see this in multiple places in Android. I'm basing this off of adb shell dumpsys meminfo -a
|
@alloy @javache @emilsjolander I just tested by changing the scheme to release and it is still piling up. Using
|
This might be totally unrelated but I have seen leaks in the past (~ a year ago) when using frameworks instead of static libraries. Specifically the JSContext of the old RN bridge was not being totally cleaned up upon reload when using frameworks. |
@byoha the same issue; |
Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally! If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:
If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution. |
@hramos I still have a same issue... RN0.51 |
@hramos i just updated to the latest, and am still seeing our memory sky rocket. Please take a look at this |
Description
In my app there's a part with react native. I upgraded to react native 0.40, and noticed that every time I open the react native VC, the memory usage keeps increasing.
Reproduction
I was able to reproduce it even with this small example: https://gist.github.com/byohay/c147f80f0f0b44cdb0026b76980342a4
Additional Information
The text was updated successfully, but these errors were encountered: