I am pretty new in iOS development and I have the following question: In my code I have a UIViewController with a UIText field that will hold a password when user will type in the view. The password is used for authentication in front a server:
UItextField* txtPassword;
[myClass loginWithPassword:txtPassword.text];
使用后,我想确保内存中没有剩余的密码,这样攻击者就无法对iPhone执行内存转储并从中提取密码。
例如,在windows中,我可以使用SeucreZeroMemory函数来用零填充内存块。
iOS的最佳方式是什么?谁负责释放UItextField*
字符串,这足够吗?