mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Fixing #75: memory leaks when Sparkle can't connect to the internet.
This commit is contained in:
1 parent
fe44611e2b
commit
c2f173eca1
1 file changed
+3
-3
+3
-3
@@ -53,12 +53,12 @@
|
||||
{
|
||||
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
RSS *feed;
|
||||
RSS *feed = [RSS alloc];
|
||||
@try
|
||||
{
|
||||
NSString *userAgent = [NSString stringWithFormat: @"%@/%@ (Mac OS X) Sparkle/1.1", [utilities hostAppName], [utilities hostAppVersion]];
|
||||
|
||||
feed = [[RSS alloc] initWithURL:url normalize:YES userAgent:userAgent];
|
||||
feed = [feed initWithURL:url normalize:YES userAgent:userAgent];
|
||||
if (!feed)
|
||||
[NSException raise:@"SUFeedException" format:@"Couldn't fetch feed from server."];
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
[tempItems addObject:[[[SUAppcastItem alloc] initWithDictionary:current] autorelease]];
|
||||
}
|
||||
items = [[NSArray arrayWithArray:tempItems] retain];
|
||||
[feed release];
|
||||
|
||||
if ([delegate respondsToSelector:@selector(appcastDidFinishLoading:)])
|
||||
[delegate performSelectorOnMainThread:@selector(appcastDidFinishLoading:) withObject:self waitUntilDone:NO];
|
||||
@@ -83,6 +82,7 @@
|
||||
}
|
||||
@finally
|
||||
{
|
||||
[feed release];
|
||||
[pool release];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user