Just use +new
I don't care what you've read, don't use +alloc/-init
. Why?
-
+new
just calls+alloc
, then-init
anyway -
+new
doesn't return an autoreleased object or anything (not that it matters when using ARC, anyway), contrary to what some might have you believe -
+new
is 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#