-1

Is this syntax acceptable or is it not best practice?

@property ABAddressBookRef myAddressBook;
RolandFlyBoy
  • 193
  • 3
  • 14
  • 3
    well, if you need an address book to be the property of your class, then what else would be good? –  Feb 05 '14 at 12:45
  • Was my original thesis but thought it would be better to change the logic of the class. I'll up vote if nobody wildly disagrees :-) – RolandFlyBoy Feb 05 '14 at 13:00
  • @RolandFlyBoy: If you use ARC then this http://stackoverflow.com/q/15861222/1187415 or this http://stackoverflow.com/q/16022019/1187415 might be helpful – Martin R Feb 05 '14 at 13:21

1 Answers1

1

Yes this is completely ok and correct. It probably just feels strange because you generally don't need to make lots of properties with CF types. If it is not toll-free bridged, you should be sure to use CFRelease in the dealloc method of your class.

uchuugaka
  • 12,679
  • 6
  • 37
  • 55