ios - Getting memory leak in SwiftUI TextField
问题描述
There is memory leak in SwiftUI TextField when I start to type in it. When I monitor this leakage using instrument I realized that the leaked object is UIDelayedAction. The leakage increase when I type more in the TextField. Is there any way to fix this?
struct ContentView: View {
@State private var value: String = ""
var body: some View {
VStack {
Text(value)
TextField("Test", text: $value)
}
}
}
解决方案
推荐阅读
- android - 从数据库的数据中填充列表
- php - 如何保持会话 fb api 图以避免(#4)应用程序请求限制达到
- c - 用文件的内容填充字符串数组
- javascript - “未捕获的语法错误:意外的标记:”在“x:element.position().get(x)”中
- python - 尝试打开多个浏览器不断收到错误脚本无法运行
- sql - SQL 创建函数在返回部分出错
- php - 如何将数值添加到值而不在php中添加或减去它
- reactjs - 带有 React 路由的 EventHandler
- sql - 如何尽可能透明地将现有 Postgres 表迁移到分区表?
- c# - == 是否总是对 SQL 中的二进制文件执行 SequenceEqual()?