iphone-textfield releasing causes crash application
<p>sir i am new in iphone i am creating UITextField using this code but when i am releasing this in dealloc application crashes. i want to make textfield by coding.
thanks in advance.</p>

<pre><code>#import "TextField.h"

@implementation TextField
UILabel *label;
UITextField *textField;

- (void)viewDidLoad 
{
    [super viewDidLoad];

    //Create label
    label = [[UILabel alloc] init];
    label.frame = CGRectMake(10, 10, 300, 40);
    label.textAlignment = UITextAlignmentCenter;
    label.text = @"";
    [self.view addSubview:label];
    [label release];

    // Initialization code
    textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 200, 300, 50)];
    textField.delegate = self;
    textField.placeholder = @"&lt;Enter Text&gt;";
    textField.textAlignment = UITextAlignmentCenter;
    [self.view addSubview: textField];
    [textField release];
}

- (void)dealloc 
{
    [textField release];
    [label release];
    [super dealloc];
}

@end
</code></pre>
