¡@

Home 

2014/10/15 ¤U¤È 10:13:45

iphone Programming Glossary: self.article

@property/@synthesize question

http://stackoverflow.com/questions/5903281/property-synthesize-question

like this @property nonatomic retain Article article ... @synthesize article Assigning something to article with self.article Article alloc init will overretain the instance given back by alloc init and cause a leak. This is because the setter of.. the setter of article will retain it and will release any previous instance for you. So you could rewrite it as self.article Article alloc init autorelease Doing this article Article alloc init is also ok but could involve a leak as article may.. would be needed article release article Article alloc init Freeing memory could be done with article release or with self.article nil The first one does access the field directly no setters getters involved. The second one sets nil to the field by using..