iOS ARC - weak and strong properties
I'm trying to understand the way ARC works, and as far as I know, I should be doing something wrong here. This is the code I'm using:

**Interface:**

    @interface ViewController : UIViewController{
    
    }
    
    @property (strong, nonatomic) NSString * myString ; @property
    @property (weak, nonatomic) NSString * myPointer ;


**Implementation:**

     - (void)viewDidLoad{
         
         [super viewDidLoad];
         self.myString = @"Hello world!" ; // myString is strong
         self.myPointer = self.myString ; // myPointer var is weak
         
         [self performSelector:@selector(makeNilMyValue) withObject:nil afterDelay:1];    
         [self performSelector:@selector(printValues) withObject:nil afterDelay:2];     }
     
     - (void) makeNilMyValue{
         myString = nil ; }
     
     - (void) printValues{
         NSLog(@"myString: %@", myString) ;
         NSLog(@"myPointer: %@", myPointer) ; 
     }

After executing this, I get:

*2012-02-26 11:40:41.652 test1[933:207] myString: (null)*

*2012-02-26 11:40:41.653 test1[933:207] myPointer: Hello world!*

If I'm not wrong, due to myPointer is weak, it shouldn't retain the content of the object. So, it should show nil instead of "Hello World!".

What am I doing wrong? 


iOS ARC - weak and strong properties
===

I'm trying to understand the way ARC works, and as far as I know, I should be doing something wrong here. This is the code I'm using:

**Interface:**

    @interface ViewController : UIViewController{
    
    }
    
    @property (strong, nonatomic) NSString * myString ; @property
    @property (weak, nonatomic) NSString * myPointer ;


**Implementation:**

     - (void)viewDidLoad{
         
         [super viewDidLoad];
         self.myString = @"Hello world!" ; // myString is strong
         self.myPointer = self.myString ; // myPointer var is weak
         
         [self performSelector:@selector(makeNilMyValue) withObject:nil afterDelay:1];    
         [self performSelector:@selector(printValues) withObject:nil afterDelay:2];     }
     
     - (void) makeNilMyValue{
         myString = nil ; }
     
     - (void) printValues{
         NSLog(@"myString: %@", myString) ;
         NSLog(@"myPointer: %@", myPointer) ; 
     }

After executing this, I get:

*2012-02-26 11:40:41.652 test1[933:207] myString: (null)*

*2012-02-26 11:40:41.653 test1[933:207] myPointer: Hello world!*

If I'm not wrong, due to myPointer is weak, it shouldn't retain the content of the object. So, it should show nil instead of "Hello World!".

What am I doing wrong? 

