Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed memory-leak warnings found by static analyzer

  • Loading branch information...
commit ab1e0af5ad7ae2028b595b74f7b66bff8b2f1559 1 parent fbf07b1
@radiantcapsule radiantcapsule authored
Showing with 4 additions and 4 deletions.
  1. +1 −1  OAMutableURLRequest.m
  2. +3 −3 OATokenManager.m
View
2  OAMutableURLRequest.m
@@ -135,7 +135,7 @@ - (void)_generateTimestamp {
- (void)_generateNonce {
CFUUIDRef theUUID = CFUUIDCreate(NULL);
CFStringRef string = CFUUIDCreateString(NULL, theUUID);
- NSMakeCollectable(theUUID);
+ [NSMakeCollectable(theUUID) autorelease];
if (nonce) {
CFRelease(nonce);
}
View
6 OATokenManager.m
@@ -282,7 +282,7 @@ - (void)exchangeToken
- (void)accessTokenReceived:(OACall *)call body:(NSString *)body
{
- OAToken *token = [[OAToken alloc] initWithHTTPResponseBody:body];
+ OAToken *token = [[[OAToken alloc] initWithHTTPResponseBody:body] autorelease];
[self setAccessToken:token];
}
@@ -361,10 +361,10 @@ - (void)dispatch {
- (void)fetchData:(NSString *)aURL method:(NSString *)aMethod parameters:(NSArray *)theParameters
files:(NSDictionary *)theFiles finished:(SEL)didFinish delegate:(NSObject*)aDelegate {
- OACall *call = [[OACall alloc] initWithURL:[NSURL URLWithString:aURL]
+ OACall *call = [[[OACall alloc] initWithURL:[NSURL URLWithString:aURL]
method:aMethod
parameters:theParameters
- files:theFiles];
+ files:theFiles] autorelease];
NSLog(@"Received request for: %@", aURL);
[self enqueue:call selector:didFinish];
if (aDelegate) {
Please sign in to comment.
Something went wrong with that request. Please try again.