Bug 25784 - Leaks seen on HTTP tests
Summary: Leaks seen on HTTP tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-14 02:20 PDT by Alexey Proskuryakov
Modified: 2009-05-14 09:47 PDT (History)
1 user (show)

See Also:


Attachments
proposed fix (2.34 KB, patch)
2009-05-14 02:23 PDT, Alexey Proskuryakov
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.