If you are programming for any iOS device, chances are high, you've came across properties. They give you these tedious accessor methods for free and in addition to that some nice memory management features.
While explaining a colleague how to implement dealloc, he pointed me to the excellent Objective-C guide of Cocoa Dev Central.
You can see a pretty straightforward implementation of an Objective-C class there, with an implementation of dealloc, the way you are used to. However, since we have synthesized getters and setters, we can simply write the following:
Basically, the implementation of the accessor at runtime handle memory management for us here, which I think is pretty neat.
{ by david linsin }
August 06, 2010
com_channels
- mail(dlinsin@gmail.com)
- jabber(dlinsin@gmail.com)
- skype(dlinsin)
my_links
recent_postings
loading...
1 comments:
Online gambling in New Jersey - DrMCD
Online 논산 출장샵 casino online 밀양 출장샵 gambling NJ is now live in NJ. We're bringing you 목포 출장마사지 the 원주 출장마사지 best in online gaming 아산 출장마사지 with no deposit bonus! Rating: 4 · Review by DrMCD
Post a Comment