ios - Objective C - [super dealloc] old? -


this question has answer here:

i have question objective c. bought book objective c. new in objective c , book include many tutorials memory management. have mac version 10.7.5. in tutorial dealloc, xcode me "arc forbids explicit message send of 'dealloc'". search error in many forums. in these forums many people [super dealloc] inherits nsobject old , newer version of system make memory management automatically. book comes out 2011.

i hope understand me.

thank in advance.

there new(ish) system ios called arc automatically sends release/retain/dealloc etc. messages objects. may read more here.

the important thing note when answering question arc optional. may use it, not have to. (when creating new xcode project, either tick "enable automatic reference counting" button, or don't.)

so, answer question: if using arc in project, yes, dealloc no longer necessary. if you're not using arc, still need manage own memory. depends on how you're setting project.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -