On iOS, I was wondering, say if I read user provided password value as such:
NSString* strPwd = UITextField.text;
//Check 'strPwd'
...
//How to clear out 'strPwd' from RAM?
I just don’t like leaving sensitive data “dangling” in the RAM. Any idea how to zero it out?
Basically you really can’t. There are bugs filed with Apple over this exact issue. Additionally there are problems with
UITextFieldandNSStringat a minimum.To reiterate the comment in a now deleted answer by @Leo Natan:
Please file another bug with apple requesting this, the more the better.
Apple Bug Reporter