Skip to content

Commit

Permalink
Fix a couple of leaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ascorbic committed Jan 20, 2011
1 parent a28b114 commit 20a7fab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions iPhone/FileUploader/FileUploader.m
Expand Up @@ -153,13 +153,13 @@ - (void) uploadFile:(NSURL*)file toServer:(NSString*)server withParams:(NSMutabl
[postBody appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]];
[req setHTTPBody:postBody];

FileUploadDelegate* delegate = [[[FileUploadDelegate alloc] init] retain];
FileUploadDelegate* delegate = [[FileUploadDelegate alloc] init];
delegate.command = self;
delegate.successCallback = successCallback;
delegate.failCallback = failCallback;
delegate.progressCallback = progressCallback;

NSURLConnection* connection = [[NSURLConnection connectionWithRequest:req delegate:delegate] retain];
[[NSURLConnection connectionWithRequest:req delegate:delegate] retain];
}

@end
Expand Down
8 changes: 3 additions & 5 deletions iPhone/MapKitPlug/src/MapKit.m
Expand Up @@ -90,9 +90,7 @@ - (void)setMapData:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)opt
CGFloat height = 480.0f;
// default at bottom
BOOL atBottom = YES;

NSArray *pins = [[NSArray alloc] init];


if ([options objectForKey:@"height"])
{
height=[[options objectForKey:@"height"] floatValue];
Expand All @@ -111,8 +109,8 @@ - (void)setMapData:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)opt


SBJSON *parser=[[SBJSON alloc] init];
pins = [parser objectWithString:[arguments objectAtIndex:0]];

NSArray *pins = [parser objectWithString:[arguments objectAtIndex:0]];
[parser autorelease];
CGRect webViewBounds = webView.bounds;

CGRect mapBounds;
Expand Down

0 comments on commit 20a7fab

Please sign in to comment.