Memory leak warning in iPhone
<blockquote>
  <p>Object 0x3d58870 of class NSCFString autoreleased with no pool in place - just leaking</p>
</blockquote>

<p>I'm receiving this memory warning for almost all variables used in the following function:</p>

<pre><code>- (void) backgroundTask {

c= [array1 count];
if (c == 0){
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"ERROR" message:@"Chose an image to upload!!!" delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil];
    [alert show];
    [alert release];
}
else {  
    for(k==0;k&lt;c;k++){
        [uploading startAnimating];

        upload = [array1 objectAtIndex:0];
        NSData *imageData = UIImageJPEGRepresentation(upload, .9);      
        NSString *urlString = @"http://fileserver.colormailer.com/fileserver/photoService?method=addPhoto&amp;description=testingupload&amp;albumId=nithinalbum&amp;userId=123nithin&amp;sid=12345678&amp;title=image125";

        NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease];
        [request setURL:[NSURL URLWithString:urlString]];
        [request setHTTPMethod:@"POST"];

        NSString *boundary = [NSString stringWithString:@"---------------------------14737809831466499882746641449"];
        NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary];
        [request addValue:contentType forHTTPHeaderField:@"Content-Type"];

        NSMutableData *body = [NSMutableData data];
        [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
        [body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"userfile\"; filename=\".jpg\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
        [body appendData:[[NSString stringWithString:@"Content-Type: application/octet-stream\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]];
        [body appendData:[NSData dataWithData:imageData]];
        [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
        [request setHTTPBody:body];

        msg = [[NSString alloc]initWithFormat:@"Upload number %d",a];
        NSLog(msg);
        NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
        NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];

        NSLog(returnString);
        a++;
        [returnString release];
        [array1 removeObjectAtIndex:0];

    }
    [uploading stopAnimating];
    if(c == 1){
        msg = [[NSString alloc]initWithFormat: @"1 image uploaded"];
    }
    else{
        msg = [[NSString alloc]initWithFormat: @"%d images uploaded",c];
    }
    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"upload success" message:msg delegate:nil cancelButtonTitle:@"OK!" otherButtonTitles:nil];
    [alert show];
    [msg release];
    [alert release];
}
}
</code></pre>

<p>I'm calling this function as:</p>

<pre><code>- (IBAction)pushUpload {
    [self performSelectorInBackground:@selector(backgroundTask) withObject:nil];
}
</code></pre>

<p>When I used the tasks inside the former function directly in the <code>Action</code> method, there were no problems, but it came for this step.
The aforementioned warnings are shown in the console.
They come for <code>NSData</code>, <code>NSString</code>, <code>NSMutableArray</code>, and everything I've initiated in this function...</p>
