Just use +new
I don't care what you've read, don't use +alloc/-init. Why?
-
+newjust calls+alloc, then-initanyway -
+newdoesn't return an autoreleased object or anything (not that it matters when using ARC, anyway), contrary to what some might have you believe -
+newis faster to type
Written by Brian Gesiak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#