views:

39

answers:

1

While I was tracking down memory usage I noticed that [searchbar becomeFirstResponder]; uses up to 4mb ram. Now Im asking why? Is that normal? Im kinda confused about this.

When commenting that line of code the memory usage of my App is, yes, - 3-4 mb.

+1  A: 

I know that displaying a keyboard is very heavy.

Have you tried to set some regular text box to become first responder?..

Michael Kessler
What do you mean ?
Gi-lo
I mean that I believe that displaying the keyboard for the first time is very heavy. Try to add a UITextField to your view and apply the `[textField becomeFirstResponder];` command instead of `[searchbar becomeFirstResponder];`. You will see that the memory will jump on that line also. After you will see the memory jump run your line `[searchbar becomeFirstResponder];`. I believe that the memory won't jump this time...
Michael Kessler