title: IPhone SDK: Proper way to return a UILabel w/o alloc
body: <p>I currently have some code that looks like:</p>
  
  <pre><code>-(UIView)someMethod {
    CGRectMake(0,0,100,100);
    UILabel *label = [[UILabel alloc] initWithFrame:rect];
    return label;
  }
  </code></pre>
  
  <p>While it <em>works</em> it obviously leaks memory and needs to be fixed. I <em>thought</em> the fix would be:</p>
  
  <pre><code>UILabel *label = [UILabel initWithFrame:rect];
  </code></pre>
  
  <p>But the compiler tells me that UILabel doesn't respond to initWithFrame. I guess my question is two-fold:</p>
  
  <p>a) What is the correct way to do this so I'm not leaking memory?</p>
  
  <p>and</p>
  
  <p>b) I'm confused as to why [UILabel alloc] would respond to initWithFrame but not UILabel by itself (my understanding is that UILabel is inherited from UIView that does respond to initWithFrame).</p>