NSMutableURLRequest *request = [[NSMutableURLRequest alloc]initWithURL:url];
[request setHTTPMethod:@"POST"];
[request setHTTPBody: [body dataUsingEncoding: NSUTF8StringEncoding]];
[webView loadRequest:request];
in The above code i am creating a NSMutableURLRequest and then i am loading a webview with this request.But it gives me moemory leak saying the following :-
1) Object leaked: object allocated and stored into ‘request’ is not referenced later in this execution path and has a retain count of +1
As the warning message says, use release statement for your request as,
or you can use
If you are not using ARC, you need to release/autorelease any params created by allocating memory. One way to avoid this is by switching to ARC.