NSAutoreleasePool with Json Data Just need to know if I'm doing something wrong in this code. my app seem work fast now with this code. I just want to if i really understant that

   - (void)receive
{


    NSString *post2 = [NSString stringWithFormat:@"expediteur=%@&amp;destinataire=%@",
                       [[expediteurLbl text] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding],
                       [[destinataireLbl text] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];

    NSData *dataToSend2 = [NSData dataWithBytes:[post2 UTF8String] length:[post2 length]  ];

    request2 = [[[NSMutableURLRequest alloc] init] autorelease];
    [request2 setURL:[NSURL URLWithString:@"http:/****************.php"]];
    [request2 setHTTPMethod:@"POST"];
    [request2 setHTTPBody:dataToSend2];
    [request2 setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"content-type"];

    [NSThread detachNewThreadSelector:@selector(displayView) toTarget:self withObject:nil]; 

    }

    -(void)displayView

    {
        NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
        NSURLResponse *response2;
        NSError *error2;
        NSData *data2 = [NSURLConnection sendSynchronousRequest:request2 returningResponse:&amp;response2 error:&amp;error2];
        reponseServeur2= [[NSMutableString alloc] initWithData:data2 encoding: NSASCIIStringEncoding];



        responseString2 = [[NSString alloc] initWithData:data2 encoding:NSUTF8StringEncoding];

        [[reponseServeur2 stringByReplacingOccurrencesOfString:@"\n"  withString:@""] mutableCopy];


        self.messageArray = [responseString2 JSONValue];
        [messTableView reloadData];




        [pool release];


    }


and

- (void)viewDidLoad {
    [super viewDidLoad];

    [self performSelectorInBackground:@selector(receive) withObject:nil];
}
I gather that request2 is an instance variable?  It's risky at best to set it with an autoreleased value and then expect it to be valid later in your displayView method.  

But it probably works because you execute receive in a background task, and background tasks have no default autorelease pool.  If it weren't for that request2 would likely go "poof" before it got to displayView.

So all of the autoreleased data items in receive -- post2, dataToSend2, request2, several temporary strings, and at least one temporary URL -- are leaking.