首页 > 解决方案 > 如何修复 React Native 中的内存泄漏?

问题描述

我的应用程序存在内存泄漏问题,当我在调试器期间开发的应用程序挂起时。

我有卸载状态和事件

在调试器模式下出现警告后:

Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
    in PTRViewAndroid (at Home.js:187)

标签: androidperformancereact-nativememory-leaks

解决方案


推荐阅读