iphone - Best way to clear a UITextField -


A for IBOutlet UIT extField , does it talk to memory management or other reasons Explains the text value?

  textFieldX.text = nil  

or

  textFieldX.text = @ ""; Message in Objective-C is acceptable  zero  object and  @ ""  a constant  NSString *  

/ code>. I'm not sure every @ "" indicates the same object in memory or if it allocates a group of 1 byte null string.

Not a big deal, just thought I would ask the community Thank you.

Personally, I think less on memory usage than using memory here.

For me, it is understood that there is always a string in a label, adding a label value to someone in the future, trying to save it in the database, wrap it in XML, etc. In this case empty NSString makes a lot of sense for me that 0x0.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -