DrRefactor

Results 22 comments of DrRefactor

@ranaavneet it's all the same 😞 even more - I removed useAnimatedStyle from my (new) repro, and it still leaks, maybe just a bit slower.

@piaskowyk @tjzel @tomekzaw @Latropos @ranaavneet I've isolated the leak to just updating sharedValue.value from JS thread on my repro-repo: https://github.com/DrRefactor/reanimated-issue-5614-repro/blob/main/App.tsx

Both of these cases are enough to cause memory leak, both leak quite fast: ``` // `s` is a state updated each 50ms useEffect(() => { x.value = s; },...

@tomekzaw I did not succeed calling `gc` on UI thread as this is an object not a function for some reason. I did call it on JS thread in a...

I did some experiments, it seems calling `runOnUI` under the hood of `Mutable` value setter triggers the leak. This part alone called as a result of sharedValue.value = makes RAM...

I just tested: - v8 - Rolling back reanimated to v2.14.4 Neither of above helped, reanimated2 looked promising in the first 2 minutes, but eventually RAM has gone up from...

This particular memory leak is fixed with: - upgrading reanimated to 3.7.0 (now officially released) - (workaround) hermes global `gc` on JS thread in an interval - upgrading RN to...

@tomekzaw In my case, `global.gc` is an object, not a function in UI thread. However, calling it from JS thread alone solves (works around?) the issue.

@ranaavneet I'm not sure. There were some major changes in SharedValue implementation, which could have fixed it. Also, this commit alone: https://github.com/software-mansion/react-native-reanimated/commit/b7f5805c0108a04dc940dd0fb9ef88b951ac1b86 fixed the issue of memory leak when only...

@tomekzaw @ranaavneet @zhekix We've finally found the last leak in our production project, it's not reanimated related! It turns out, React Native's Android native image caching caused memory to slowly...