Skip to content

Commit

Permalink
Converting to ARC.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Weiß committed Jan 17, 2014
1 parent 1148dd8 commit a0b44da
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
2 changes: 1 addition & 1 deletion KBWebArchiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
BOOL _localResourceLoadingOnly;
}

@property (nonatomic, readwrite, retain) NSURL *URL;
@property (nonatomic, readwrite, strong) NSURL *URL;
@property (nonatomic) BOOL localResourceLoadingOnly;

- (id)initWithURLString:(NSString *)aURLString isFilePath:(BOOL)isFilePath;
Expand Down
14 changes: 2 additions & 12 deletions KBWebArchiver.m
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ - (id)initWithURL:(NSURL *)aURL

if (self)
{
_URL = [aURL retain];
_URL = aURL;
_archiveInformation = nil;
_localResourceLoadingOnly = NO;
}
Expand All @@ -77,13 +77,6 @@ - (id)init
return [self initWithURL:nil];
}

- (void)dealloc
{
[_URL release];
[_archiveInformation release];

[super dealloc];
}

- (void)setURLString:(NSString *)aURLString isFilePath:(BOOL)isFilePath
{
Expand Down Expand Up @@ -133,12 +126,11 @@ - (NSError *)error
if ([_URL isEqual:_archiveInformation[@"URL"]] == NO)
return nil;

return [[_archiveInformation[@"Error"] retain] autorelease];
return _archiveInformation[@"Error"];
}

- (void)getWebPage
{
[_archiveInformation release];
_archiveInformation = [[NSMutableDictionary alloc] init];

if (_URL == nil)
Expand Down Expand Up @@ -251,7 +243,6 @@ - (void)getWebPage
// If the load failed, don't set any more data - just return.
if (_loadFailed)
{
[webView release];

if (_archiveInformation[@"Error"] == nil)
{
Expand Down Expand Up @@ -289,7 +280,6 @@ - (void)getWebPage
}


[webView release];
}

// Oh dear, this can cause some crashes - eg. importing Yahoo...
Expand Down
2 changes: 1 addition & 1 deletion NSURL+ValidityChecking.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ - (BOOL)httpIsValid
cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
#endif

NSURLRequest *request = [NSURLRequest requestWithURL:[[self copy] autorelease] // Don't actually send self, just in case...
NSURLRequest *request = [NSURLRequest requestWithURL:[self copy] // Don't actually send self, just in case...
cachePolicy:cachePolicy
timeoutInterval:30];
NSHTTPURLResponse *response = nil;
Expand Down

0 comments on commit a0b44da

Please sign in to comment.