title: With arc will this cause a memory leak?
body: <p>I have some code that confuses me</p>
  
  <p>The code is:</p>
  
  <pre><code>for (int i=0; i &lt; numOfRooms; i++) {
  
      NSString* roomName = [self getString:themessageReceived :packetstart + index];
      NSLog(@"roomName is %@ with length %d roomID %d",roomName, roomName.length,roomID);
      [roomsInTheClub insertRoom:roomID :roomName];
      index += roomName.length;
      index++;
  
  }
  </code></pre>
  
  <p>Now originally I was thinking, seeing <code>NSString</code> is non mutable I would need to create a <code>NSMutableString</code> above the loop, then change the <code>getString</code> call to return a mutable <code>NSString</code>, or cast the return from the call</p>
  
  <p>I am amazed the above actually works and allows the same <code>NSString</code> to be created over an over again</p>
  
  <p>I could change it to send the <code>NSString</code> from <code>getString</code> directly to the <code>insertRoom</code> code and bypass actually creating an <code>NSString</code> each pass through the loop</p>
  
  <p>I am puzzled over this</p>
  
  <p>Is ARC dealing with this automatically, allowing me to declare the same <code>NSString</code> over and over again in the loop</p>
  
  <p>Or have a created a Memory Leak ?</p>
  
  <p>Thanks In Advance</p>
  
  <p>Phil</p>