Bug 25784

Summary: Leaks seen on HTTP tests
Product: WebKit Reporter: Alexey Proskuryakov <ap>
Component: PlatformAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: husam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
proposed fix darin: review+

Description Alexey Proskuryakov 2009-05-14 02:20:20 PDT
There are many leaks seen on HTTP tests. Some of them seem to be in system frameworks, so I'm going to fix some, and file Radar bugs for others.

For those who can see it, one Radar bug is <rdar://problem/6886937>.
Comment 1 Alexey Proskuryakov 2009-05-14 02:23:49 PDT
Created attachment 30320 [details]
proposed fix

This fixes two bugs I found.
Comment 2 Alexey Proskuryakov 2009-05-14 05:09:13 PDT
(In reply to comment #0)
> For those who can see it, one Radar bug is <rdar://problem/6886937>.

Another one: <rdar://problem/6887278>.
Comment 3 Darin Adler 2009-05-14 09:24:24 PDT
Comment on attachment 30320 [details]
proposed fix

> -        NSMutableURLRequest *mutableRequest = [request.nsURLRequest() mutableCopy];
> +        NSMutableURLRequest *mutableRequest = [[request.nsURLRequest() mutableCopy] autorelease];

Clearly this was just introduced by the bug fix for content sniffing. I'd prefer to find a way to fix this with an additional local variable and a normal release rather than autorelease.

r=me as is, but consider making it use release instead of autorelease
Comment 4 Alexey Proskuryakov 2009-05-14 09:47:24 PDT
Committed r43709.

(In reply to comment #3)
> r=me as is, but consider making it use release instead of autorelease

I think that it would be much more interesting - but also more difficult - to avoid autorelease in common code path.