regarding potential leak
<p>am getting the potential leak in the following code.(returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];)pls help me to find out.</p>

<pre><code>+ (NSString *) getResponseFromServer:(NSString *) url
{

NSString *URLString1 = [NSString stringWithContentsOfURL:[NSURL URLWithString:@"http://www.google.com"]];
if(URLString1 == NULL)
{
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Info" message:@"You must be connected to the Internet to use this app. Wireless , 3G and EDGE are supported" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
    alert.delegate = self;
    [alert show];
    [alert release];
    return @"NO" ;
}

else
{
//CFStringRef escapeChars = (CFStringRef) @":/?#[]@!$&amp;’()*+,;=";
//  url = (NSString *) CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)url, NULL, escapeChars, kCFStringEncodingUTF8);



url = [url stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding];
//[self alert:escapedUrlString];


url=[url stringByReplacingOccurrencesOfString:@"%2526" withString:@"%26"];
//NSLog(@"url 2 = %@ ",url);
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setURL:[NSURL URLWithString:url]];
NSLog(@"******Loading URL = %@",[NSURL URLWithString:url]);

NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *returnString = @"";
if(returnData)
{
    returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];    //Potential leak here...

//  NSRange range = [str rangeOfString:supplierSearchText.text options:NSCaseInsensitiveSearch];
    //NSLog(@"Searching = %d, %@, %@, %d", i, str, supplierSearchText.text, range.location);
    //if(range.location == 0)   
    int num = [url rangeOfString:@"iphone_logout.php" options:NSCaseInsensitiveSearch].location;
               NSLog(@"&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; NUmber  = %d", num);
    if(isUserLoggedIn &gt; 0 &amp;&amp; global_Timer != nil &amp;&amp; num &gt; 1000)
    {
    if(((int)([url rangeOfString:@"iphone_user.php" options:NSCaseInsensitiveSearch].location) &lt; 1000) ||
       ((int)([url rangeOfString:@"company_name.php" options:NSCaseInsensitiveSearch].location) &lt; 1000) ||
       ((int)([url rangeOfString:@"company_search.php" options:NSCaseInsensitiveSearch].location) &lt; 1000) ||
       ((int)([url rangeOfString:@"view_web.php" options:NSCaseInsensitiveSearch].location) &lt; 1000))
    {
        [global_Timer invalidate];
        NSLog(@"&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; Timer invalidating &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;, %d, %d, %d, %d", ((int)([url rangeOfString:@"iphone_user.php" options:NSCaseInsensitiveSearch].location) &gt; -1) , ((int)([url rangeOfString:@"company_name.php" options:NSCaseInsensitiveSearch].location) &gt; -1) , ((int)([url rangeOfString:@"company_search.php" options:NSCaseInsensitiveSearch].location) &gt; -1), ((int)([url rangeOfString:@"view_web.php" options:NSCaseInsensitiveSearch].location) &gt; -1) );
        global_Timer =  [NSTimer scheduledTimerWithTimeInterval:(NSTimeInterval)300.0 target:global_SupplierToolsViewController selector:@selector(pressButton_Logout) userInfo:nil repeats:NO];        

    }
    else {
        NSLog(@"No matches found!, %d", (int)([url rangeOfString:@"iphone_user.php" options:NSCaseInsensitiveSearch].location));
    }
    }


}
else //if(!networkFlag)
{
    //networkFlag = YES;
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:@"Network connection failed! Try again later!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
    [alert show];
    [alert release];
    return @"NO";
}
//[url release];
[request release];

return returnString;
}

}
</code></pre>
