You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
输出下面的信息:
2017-11-14 11:58:37.373501+0800 lin-sdk-demo[3933:3009455] Memory Leak: (
LoginController,
UIView,
UITextField
)
2017-11-14 11:58:37.374111+0800 lin-sdk-demo[3933:3009455] Possibly Memory Leak.
In case that UITextField should not be dealloced, override -willDealloc in UITextField by returning NO.
View-ViewController stack: (
LoginController,
UIView,
UITextField
)
2017-11-14 11:58:37.416103+0800 lin-sdk-demo[3933:3009455] Memory Leak: (
LoginController,
UIView,
UITextField
)
2017-11-14 11:58:37.416508+0800 lin-sdk-demo[3933:3009455] Possibly Memory Leak.
In case that UITextField should not be dealloced, override -willDealloc in UITextField by returning NO.
View-ViewController stack: (
LoginController,
UIView,
UITextField
)
when i set keboardType = .emailAddress or .numbersAndPunctuation, .namePhonePad
it will call deinit normally, otherwise it dose not call deinit any more.
I am running into this issue too, can anyone solve this problem?
does it has private API could work?
when i set keboardType = .emailAddress or .numbersAndPunctuation, .namePhonePad it will call deinit normally, otherwise it dose not call deinit any more.
I am running into this issue too, can anyone solve this problem? does it has private API could work?
Activity
Zepo commentedon Nov 14, 2017
请贴一下详细信息,弹窗的截图等
willylee007 commentedon Nov 14, 2017
输出下面的信息:
2017-11-14 11:58:37.373501+0800 lin-sdk-demo[3933:3009455] Memory Leak: (
LoginController,
UIView,
UITextField
)
2017-11-14 11:58:37.374111+0800 lin-sdk-demo[3933:3009455] Possibly Memory Leak.
In case that UITextField should not be dealloced, override -willDealloc in UITextField by returning NO.
View-ViewController stack: (
LoginController,
UIView,
UITextField
)
2017-11-14 11:58:37.416103+0800 lin-sdk-demo[3933:3009455] Memory Leak: (
LoginController,
UIView,
UITextField
)
2017-11-14 11:58:37.416508+0800 lin-sdk-demo[3933:3009455] Possibly Memory Leak.
In case that UITextField should not be dealloced, override -willDealloc in UITextField by returning NO.
View-ViewController stack: (
LoginController,
UIView,
UITextField
)
willylee007 commentedon Nov 14, 2017
简单说明一下, 这是个简单的登录页面, 有几个简单的textfield, 有个登录按钮, 点击会进行登录请求, 然后loading有个SVProgresshud, 点击空白去掉hud(touchesBegan方法里实现的), 整个页面大概这些逻辑.
DreamBuddy commentedon Nov 17, 2017
@willylee007 @Zepo 我也是在iOS11下 UITextField报没释放~
willylee007 commentedon Nov 20, 2017
@DreamBuddy +1 .页面是销毁的, 估计11下需要对UITextField作额外处理 @Zepo
Zepo commentedon Nov 20, 2017
试了没能重现,能否提供 demo?
DreamBuddy commentedon Nov 20, 2017
@Zepo Demo确实没复现,猜测是某些框架引起的,我正在实验
DreamBuddy commentedon Nov 20, 2017
测试了一个晚上,很是奇怪 secureTextEntry 为 YES的时候就会内存泄漏,但是demo中即使设置为YES 也不会。。
DreamBuddy commentedon Nov 20, 2017
@willylee007 你试试。。看看secureTextEntry这个参数有没有关系
ghost commentedon Nov 27, 2017
我也有这个问题,,不清楚怎么解决,,求教
Jinzhengxuan commentedon Dec 5, 2017
2017-12-05 21:38:35.766938+0800 MiaoMoreNew[3907:417197] Memory Leak: (
UGUnbindMobileViewController,
UIView,
MMTextField
)
Jinzhengxuan commentedon Dec 5, 2017
发现误报,ViewController已经释放了,但是会报MMTextField的内存溢出
Zepo commentedon Dec 7, 2017
@Jinzhengxuan 你这个报的是 MMTextField 没释放
liubin1777 commentedon Dec 8, 2017
在iOS11下UITextField好像不会调用Dealloc被释放,是不是iOS11的一个Bug
lingfengmarskey commentedon Dec 8, 2017
可以重现的bug xcode9.2 ios11.2demo @Zepo
10 remaining items
ChavezChen commentedon Jan 16, 2018
我这里也出现了报UITextField内存泄露的问题,楼上有同学提供了一种解决11.2误报的思路非常的好,但是其实框架的提供者有为我们提供了一个更好的解决方法:就是白名单,我们可以把UITextField加入到白名单内就好了,提供我的修改建议,在框架的NSObject+MemoryLeak.m 这个文件下 ,第114行的函数就是返回白名单数组,在这个方法里面添加2行代码,判断一下当前版本是否是11以上,然后将UITextField加入白名单即可,这样不必添加分类,iOS11以下也能监测UITextField的内存泄漏问题
ChavezChen commentedon Jan 18, 2018
https://forums.developer.apple.com/thread/94323 UITextField在11.2会报内存泄露,实锤是苹果系统的bug,楼主的框架非常准确,它就是内存泄露了~👍👍👍
willylee007 commentedon Jan 18, 2018
楼上正解. close.
binzi56 commentedon Mar 14, 2019
正解
AgoniNemo commentedon Nov 1, 2019
以上代码会内存泄漏在iOS 12+
cddjr commentedon Nov 1, 2019
ios自身的问题,参考上面的代码屏蔽
KennyHito commentedon Mar 3, 2022
将textfield 的autocorrectionType属性设置为NO,亲测有效!
AllenChen1988 commentedon Jul 21, 2022
神了
NighWish commentedon Feb 23, 2023
iOS15上 autocorrectionType = NO也无效,只有一进来不调用becomeFirstResponder
NighWish commentedon Feb 23, 2023
keyboardType = .emailAddress会释放,keyboardType = .numberPad不会释放
Tiaotiaotiao commentedon Dec 21, 2023
是的 坑爹啊 😭
wxm5558 commentedon Dec 9, 2024
when i set keboardType = .emailAddress or .numbersAndPunctuation, .namePhonePad
it will call deinit normally, otherwise it dose not call deinit any more.
I am running into this issue too, can anyone solve this problem?
does it has private API could work?
TangChunhui commentedon Feb 20, 2025
怎么解决这个问题的啊