title: weak pointer to NSData cannot read data using NSURLConnection?
body: <p>I don't truly understand the difference between weak and strong pointer.
  It doesn't cause any big problem until now I am following an example in the documentation, making an NSURLRequest and use it in NSURLConnection to received data.</p>
  
  <p>The code is like this:</p>
  
  <pre><code>    //create the request with url
      NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://localhost:3000/students.json"]];
  
      //create the with the request
      NSURLConnection *connection = [[NSURLConnection alloc]initWithRequest:request delegate:self];
  
  
      if (connection) {
          //create NSData instance to hold data if connection is successfull
          self.receivedData = [[NSMutableData alloc]init];
  //        NSLog(@"%@",@"Connection successfully");
      }
      else{
          NSLog(@"%@",@"Connection failed");
      }
  </code></pre>
  
  <p>SO I append data into <code>receivedData</code> in the body of delegate method.</p>
  
  <p><code>@property (strong,nonatomic) NSMutableData *receivedData;</code></p>
  
  <pre><code>//delegate method
  -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data{
      [self.receivedData appendData:data];
      NSLog(@"%@",@"Receiving Data");
  }
  -(void)connectionDidFinishLoading:(NSURLConnection *)connection{
      NSLog(@"Succeeded! Received %d bytes of data",[self.receivedData length]);
  }
  </code></pre>
  
  <p>the code I posted above is working:) because I have just fixed it.</p>
  
  <p><strong>My question is</strong> - The type of the pointer was original <code>weak</code>. I would always get 0 bytes of data from <code>[self.receivedData length]</code> before I have changed the type of pointer from <code>weak</code> to <code>strong</code> and I don't understand why it can't <strong>hold</strong> the data.</p>