android - 如何修复 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)
解决方案
推荐阅读
- python - matplotlib中有两个变量的直方图
- c# - 解码 Google 的 Base64
- vba - 如何使用 Outlook VBA 将用户添加到现有分发列表
- python - 无法向 pandas DataFrame 添加值
- c# - 只读结构作为返回参数
- java - 覆盖 Bash 脚本中的 ClassPath 以运行 Java 应用程序
- java - 与在 Kibana 上执行 Query DSL 相比,来自 Java REST 高级客户端的 Elasticsearch 查询返回不同/不受欢迎的结果
- selenium-webdriver - 如何获取加载微调器的 xpath
- php - 在 Azure Web 服务中安装 imagick 扩展
- php - 通过 odbc_connect() 连接到 SQL Server 数据库时出现编码问题