Object ▁new ]; ▁ ▁Also , ▁some ▁classes ▁implement ▁class ▁method ▁initial izers . ▁Like ▁+ new , ▁they ▁combine ▁+ alloc ▁and ▁- init , ▁but ▁unlike ▁+ new , ▁they ▁return ▁an ▁aut ore leased ▁instance . ▁Some ▁class ▁method ▁initial izers ▁take ▁parameters : ▁ ▁My Object ▁* foo ▁= ▁[ My Object ▁object ]; ▁My Object ▁* bar ▁= ▁[ My Object ▁object With String :@" Wik ipedia ▁:) "]; ▁ ▁The ▁alloc ▁message ▁alloc ates ▁enough ▁memory ▁to ▁hold ▁all ▁the ▁instance ▁variables ▁for ▁an ▁object , ▁sets ▁all ▁the ▁instance ▁variables ▁to ▁zero ▁values , ▁and ▁turns ▁the ▁memory ▁into ▁an ▁instance ▁of ▁the ▁class ; ▁at ▁no ▁point ▁during ▁the ▁initialization ▁is ▁the ▁memory ▁an ▁instance ▁of ▁the ▁super class . ▁ ▁The ▁init ▁message ▁performs ▁the ▁set - up ▁of ▁the ▁instance ▁upon ▁creation . ▁The ▁init ▁method ▁is ▁often ▁written ▁as ▁follows : ▁ ▁- ▁( id ) init ▁{ ▁▁▁▁ ▁self ▁= ▁[ super ▁init ]; ▁▁▁▁ ▁if ▁( self ) ▁{ ▁▁▁▁▁▁▁▁ ▁// ▁perform ▁initialization ▁of ▁object ▁here ▁▁▁▁ ▁} ▁▁▁▁ ▁return ▁self ; ▁} ▁ ▁In ▁the ▁above ▁example , ▁notice ▁the ▁id ▁return ▁type . ▁This ▁type ▁stands ▁for ▁" pointer ▁to ▁any ▁object " ▁in ▁Object ive - C ▁( See ▁the ▁Dynamic ▁typing ▁section ). ▁ ▁The ▁initial izer ▁pattern ▁is ▁used ▁to ▁ass ure ▁that ▁the ▁object ▁is ▁properly ▁initialized ▁by ▁its ▁super class ▁before ▁the ▁init ▁method ▁performs ▁its ▁initialization . ▁It ▁performs ▁the ▁following ▁actions