¡@

Home 

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

iphone Programming Glossary: self.mystring

Why do weak NSString properties not get released in iOS?

http://stackoverflow.com/questions/11107729/why-do-weak-nsstring-properties-not-get-released-in-ios

myObj _myObj void viewDidAppear BOOL animated NSLog @ Appearing Obj @ self.myObj NSLog @ Appearing String @ self.myString void viewDidLoad self.myObj NSObject alloc init self.myString NSString alloc init NSLog @ Loading Obj @ self.myObj NSLog.. @ Appearing Obj @ self.myObj NSLog @ Appearing String @ self.myString void viewDidLoad self.myObj NSObject alloc init self.myString NSString alloc init NSLog @ Loading Obj @ self.myObj NSLog @ Loading String @ self.myString However surprisingly I got these.. NSObject alloc init self.myString NSString alloc init NSLog @ Loading Obj @ self.myObj NSLog @ Loading String @ self.myString However surprisingly I got these results 2012 06 19 15 08 22.516 TESTER 4041 f803 Loading Obj null 2012 06 19 15 08 22.517..

iOS Singletons and Memory Management

http://stackoverflow.com/questions/4222069/ios-singletons-and-memory-management

in the singleton like this myString @ value When you assign directly to the iVar instead of using the property syntax self.myString @ value you are bypassing the synthesized setter method which means that the retain never happens. Properties aren't magic... for the . access and the ability to have synthesized getter setter methods to save you the tedium of writing your own. self.myString @ value is just shorthand for self setMyString @ value The synthesized setMyString method will do something like if myString..

@property/@synthesize question

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

I see different syntax in different blogs and books. I've seen myString NSString alloc initWithString @ Hi there or self.myString NSString alloc initWithString @ Hi there Then in dealloc I see self.myString nil or myString release or self.myString nil.. alloc initWithString @ Hi there or self.myString NSString alloc initWithString @ Hi there Then in dealloc I see self.myString nil or myString release or self.myString nil myString release On this site someone stated that using self adds another increment.. self.myString NSString alloc initWithString @ Hi there Then in dealloc I see self.myString nil or myString release or self.myString nil myString release On this site someone stated that using self adds another increment to the retain count Is that true..