How to secure dealloc memory for objectiveC Strings in iOS?
<p>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:</p>

<pre><code>UItextField* txtPassword;
[myClass loginWithPassword:txtPassword.text];
</code></pre>

<p>After using it I want to be sure that there are no leftovers of the password in the memory, so an attacker won't be able performing a memory dump of the iPhone and extracting from it the password.</p>

<p>In windows for example I could use the SeucreZeroMemory function for filling a block of memory with zeros.</p>

<p>What is the best way doing it for iOS? Who is responsible to free the <code>UItextField*</code> string, and is it enough?</p>
